Merge remote-tracking branch 'origin/feat/tests-http-endpoint' into feat/tests-http-endpoint
This commit is contained in:
commit
ea3c5c67aa
|
|
@ -1,8 +1,6 @@
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Elsa.Workflows.ComponentTests.Abstractions;
|
using Elsa.Workflows.ComponentTests.Abstractions;
|
||||||
using Elsa.Workflows.ComponentTests.Fixtures;
|
using Elsa.Workflows.ComponentTests.Fixtures;
|
||||||
using Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
|
||||||
|
|
||||||
namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http;
|
namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http;
|
||||||
|
|
||||||
public class HttpEndpointRouteParametersTests(App app) : AppComponentTest(app)
|
public class HttpEndpointRouteParametersTests(App app) : AppComponentTest(app)
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public class HttpEndpointTests(App app) : AppComponentTest(app)
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var client = WorkflowServer.CreateHttpWorkflowClient();
|
var client = WorkflowServer.CreateHttpWorkflowClient();
|
||||||
var request = new HttpRequestMessage(new HttpMethod(method), "test/multi-method");
|
using var request = new HttpRequestMessage(new HttpMethod(method), "test/multi-method");
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var response = await client.SendAsync(request);
|
var response = await client.SendAsync(request);
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ This directory contains comprehensive component tests for the `HttpEndpoint` act
|
||||||
- HTTP method validation
|
- HTTP method validation
|
||||||
- Simple request/response handling
|
- Simple request/response handling
|
||||||
- Concurrent request processing
|
- Concurrent request processing
|
||||||
- Large payload handling
|
|
||||||
- Special character route handling
|
- Special character route handling
|
||||||
- Synchronous workflow completion validation
|
- Synchronous workflow completion validation
|
||||||
|
|
||||||
|
|
@ -39,14 +38,8 @@ This directory contains comprehensive component tests for the `HttpEndpoint` act
|
||||||
- Empty file handling
|
- Empty file handling
|
||||||
|
|
||||||
6. **Security and Edge Cases Tests** (`HttpEndpointSecurityAndEdgeCasesTests.cs`)
|
6. **Security and Edge Cases Tests** (`HttpEndpointSecurityAndEdgeCasesTests.cs`)
|
||||||
- Authentication/authorization
|
|
||||||
- Blocked file extensions
|
- Blocked file extensions
|
||||||
- Request size limits
|
|
||||||
- File size validation
|
|
||||||
- File extension validation
|
- File extension validation
|
||||||
- MIME type validation
|
|
||||||
- Malformed request handling
|
|
||||||
- Extreme input validation
|
|
||||||
- Case sensitivity
|
- Case sensitivity
|
||||||
- Security constraints
|
- Security constraints
|
||||||
|
|
||||||
|
|
@ -91,7 +84,6 @@ The `Workflows/` directory contains test workflow implementations:
|
||||||
- ✅ Empty and null value handling
|
- ✅ Empty and null value handling
|
||||||
- ✅ Case sensitivity scenarios
|
- ✅ Case sensitivity scenarios
|
||||||
- ✅ Malformed multipart data
|
- ✅ Malformed multipart data
|
||||||
- ✅ Extremely long paths and headers
|
|
||||||
|
|
||||||
### Error Handling
|
### Error Handling
|
||||||
- ✅ Invalid JSON processing
|
- ✅ Invalid JSON processing
|
||||||
|
|
@ -99,7 +91,6 @@ The `Workflows/` directory contains test workflow implementations:
|
||||||
- ✅ File validation failures
|
- ✅ File validation failures
|
||||||
- ✅ Request size limit exceeded
|
- ✅ Request size limit exceeded
|
||||||
- ✅ Missing route parameters
|
- ✅ Missing route parameters
|
||||||
- ✅ Authentication failures
|
|
||||||
|
|
||||||
## Test Execution
|
## Test Execution
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
||||||
|
|
||||||
public class BasicHttpEndpointWorkflow : WorkflowBase
|
public class BasicHttpEndpointWorkflow : WorkflowBase
|
||||||
{
|
{
|
||||||
private static readonly string DefinitionId = Guid.NewGuid().ToString();
|
public static readonly string DefinitionId = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
protected override void Build(IWorkflowBuilder builder)
|
protected override void Build(IWorkflowBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
||||||
|
|
||||||
public class BlockedFileExtensionWorkflow : WorkflowBase
|
public class BlockedFileExtensionWorkflow : WorkflowBase
|
||||||
{
|
{
|
||||||
private static readonly string DefinitionId = Guid.NewGuid().ToString();
|
public static readonly string DefinitionId = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
protected override void Build(IWorkflowBuilder builder)
|
protected override void Build(IWorkflowBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
||||||
|
|
||||||
public class FileUploadWorkflow : WorkflowBase
|
public class FileUploadWorkflow : WorkflowBase
|
||||||
{
|
{
|
||||||
private static readonly string DefinitionId = Guid.NewGuid().ToString();
|
public static readonly string DefinitionId = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
protected override void Build(IWorkflowBuilder builder)
|
protected override void Build(IWorkflowBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
||||||
|
|
||||||
public class FormDataWorkflow : WorkflowBase
|
public class FormDataWorkflow : WorkflowBase
|
||||||
{
|
{
|
||||||
private static readonly string DefinitionId = Guid.NewGuid().ToString();
|
public static readonly string DefinitionId = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
protected override void Build(IWorkflowBuilder builder)
|
protected override void Build(IWorkflowBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
||||||
|
|
||||||
public class JsonContentWorkflow : WorkflowBase
|
public class JsonContentWorkflow : WorkflowBase
|
||||||
{
|
{
|
||||||
private static readonly string DefinitionId = Guid.NewGuid().ToString();
|
public static readonly string DefinitionId = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
protected override void Build(IWorkflowBuilder builder)
|
protected override void Build(IWorkflowBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
||||||
|
|
||||||
public class MultipleHttpMethodsWorkflow : WorkflowBase
|
public class MultipleHttpMethodsWorkflow : WorkflowBase
|
||||||
{
|
{
|
||||||
private static readonly string DefinitionId = Guid.NewGuid().ToString();
|
public static readonly string DefinitionId = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
protected override void Build(IWorkflowBuilder builder)
|
protected override void Build(IWorkflowBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
||||||
|
|
||||||
public class QueryStringAndHeadersWorkflow : WorkflowBase
|
public class QueryStringAndHeadersWorkflow : WorkflowBase
|
||||||
{
|
{
|
||||||
private static readonly string DefinitionId = Guid.NewGuid().ToString();
|
public static readonly string DefinitionId = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
protected override void Build(IWorkflowBuilder builder)
|
protected override void Build(IWorkflowBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
||||||
|
|
||||||
public class RouteParametersWorkflow : WorkflowBase
|
public class RouteParametersWorkflow : WorkflowBase
|
||||||
{
|
{
|
||||||
private static readonly string DefinitionId = Guid.NewGuid().ToString();
|
public static readonly string DefinitionId = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
protected override void Build(IWorkflowBuilder builder)
|
protected override void Build(IWorkflowBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue