Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit df2c2bb

Browse files
Fix/1403and1404 removed duplicate Key SubscriptionClientName and added app.UseAuthorization() call (#1406)
* #1403 removed duplicate Key SubscriptionClientName Removed duplicate key SubscriptionClientName from Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json and sorted its content in asc order. * #1404 Added app.UseAuthorization() call Added app.UseAuthorization() call to BasketTestsStartup, LocationsTestsStartup, and MarketingTestsStartup to fix failed unit tests IntegrationEventsScenarios.Post_update_product_price_and_catalog_and_basket_list_modified and MarketingScenarios.Set_new_user_location_and_get_location_campaign_by_user_id (see #1404)
1 parent 921de69 commit df2c2bb

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ protected override void ConfigureAuth(IApplicationBuilder app)
1616
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
1717
{
1818
app.UseMiddleware<AutoAuthorizeMiddleware>();
19+
app.UseAuthorization();
1920
}
2021
else
2122
{

src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ protected override void ConfigureAuth(IApplicationBuilder app)
1919
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
2020
{
2121
app.UseMiddleware<LocationAuthorizeMiddleware>();
22+
app.UseAuthorization();
2223
}
2324
else
2425
{

src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ protected override void ConfigureAuth(IApplicationBuilder app)
1616
if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant())
1717
{
1818
app.UseMiddleware<AutoAuthorizeMiddleware>();
19+
app.UseAuthorization();
1920
}
2021
else
2122
{
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2+
"AzureServiceBusEnabled": false,
23
"ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word",
3-
"MongoConnectionString": "mongodb://localhost:27017",
4-
"MongoDatabase": "MarketingDb",
4+
"EventBusConnection": "localhost",
55
"IdentityUrl": "http://localhost:5105",
66
"isTest": "true",
7-
"EventBusConnection": "localhost",
8-
"AzureServiceBusEnabled": false,
9-
"SubscriptionClientName": "Marketing",
7+
"MongoConnectionString": "mongodb://localhost:27017",
8+
"MongoDatabase": "MarketingDb",
109
"PicBaseUrl": "http://localhost:5110/api/v1/campaigns/[0]/pic/",
1110
"SubscriptionClientName": "Marketing"
1211
}

0 commit comments

Comments
 (0)