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 Elsa.Workflows.ComponentTests.Abstractions;
|
||||
using Elsa.Workflows.ComponentTests.Fixtures;
|
||||
using Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
||||
|
||||
namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http;
|
||||
|
||||
public class HttpEndpointRouteParametersTests(App app) : AppComponentTest(app)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class HttpEndpointTests(App app) : AppComponentTest(app)
|
|||
{
|
||||
// Arrange
|
||||
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
|
||||
var response = await client.SendAsync(request);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ This directory contains comprehensive component tests for the `HttpEndpoint` act
|
|||
- HTTP method validation
|
||||
- Simple request/response handling
|
||||
- Concurrent request processing
|
||||
- Large payload handling
|
||||
- Special character route handling
|
||||
- Synchronous workflow completion validation
|
||||
|
||||
|
|
@ -39,14 +38,8 @@ This directory contains comprehensive component tests for the `HttpEndpoint` act
|
|||
- Empty file handling
|
||||
|
||||
6. **Security and Edge Cases Tests** (`HttpEndpointSecurityAndEdgeCasesTests.cs`)
|
||||
- Authentication/authorization
|
||||
- Blocked file extensions
|
||||
- Request size limits
|
||||
- File size validation
|
||||
- File extension validation
|
||||
- MIME type validation
|
||||
- Malformed request handling
|
||||
- Extreme input validation
|
||||
- Case sensitivity
|
||||
- Security constraints
|
||||
|
||||
|
|
@ -91,7 +84,6 @@ The `Workflows/` directory contains test workflow implementations:
|
|||
- ✅ Empty and null value handling
|
||||
- ✅ Case sensitivity scenarios
|
||||
- ✅ Malformed multipart data
|
||||
- ✅ Extremely long paths and headers
|
||||
|
||||
### Error Handling
|
||||
- ✅ Invalid JSON processing
|
||||
|
|
@ -99,7 +91,6 @@ The `Workflows/` directory contains test workflow implementations:
|
|||
- ✅ File validation failures
|
||||
- ✅ Request size limit exceeded
|
||||
- ✅ Missing route parameters
|
||||
- ✅ Authentication failures
|
||||
|
||||
## Test Execution
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Elsa.Workflows.ComponentTests.Scenarios.Activities.Http.Workflows;
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue