fix functional tests
This commit is contained in:
parent
2ea2b0abb0
commit
aef73d7b6e
@ -11,7 +11,7 @@ namespace Ordering.API.Application.Commands
|
|||||||
{
|
{
|
||||||
|
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public int OrderNumber { get; private set; }
|
public int OrderNumber { get; set; }
|
||||||
public CancelOrderCommand()
|
public CancelOrderCommand()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ namespace FunctionalTests.Middleware
|
|||||||
|
|
||||||
identity.AddClaim(new Claim("sub", IDENTITY_ID));
|
identity.AddClaim(new Claim("sub", IDENTITY_ID));
|
||||||
identity.AddClaim(new Claim("unique_name", IDENTITY_ID));
|
identity.AddClaim(new Claim("unique_name", IDENTITY_ID));
|
||||||
|
identity.AddClaim(new Claim(ClaimTypes.Name, IDENTITY_ID));
|
||||||
|
|
||||||
httpContext.User.AddIdentity(identity);
|
httpContext.User.AddIdentity(identity);
|
||||||
await _next.Invoke(httpContext);
|
await _next.Invoke(httpContext);
|
||||||
|
@ -20,6 +20,7 @@ namespace FunctionalTests.Services.Ordering
|
|||||||
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
|
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
|
||||||
{
|
{
|
||||||
app.UseMiddleware<AutoAuthorizeMiddleware>();
|
app.UseMiddleware<AutoAuthorizeMiddleware>();
|
||||||
|
app.UseAuthorization();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -6,5 +6,6 @@
|
|||||||
"EventBusConnection": "localhost",
|
"EventBusConnection": "localhost",
|
||||||
"CheckUpdateTime": "30000",
|
"CheckUpdateTime": "30000",
|
||||||
"GracePeriodTime": "1",
|
"GracePeriodTime": "1",
|
||||||
"SubscriptionClientName": "Ordering"
|
"SubscriptionClientName": "Ordering",
|
||||||
|
"IdentityUrlExternal": "http://localhost:5105"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user