From df2c2bb10ee9942e98aecb1be2d15c8404262bd4 Mon Sep 17 00:00:00 2001 From: InstanceFactory Date: Wed, 26 Aug 2020 16:36:44 +0200 Subject: [PATCH] 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) --- .../Services/Basket/BasketTestsStartup.cs | 1 + .../Services/Location/LocationsTestsStartup.cs | 1 + .../Services/Marketing/MarketingTestsStartup.cs | 1 + .../Services/Marketing/appsettings.json | 9 ++++----- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs index cfb91fd40..6043a7ab3 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs @@ -16,6 +16,7 @@ namespace FunctionalTests.Services.Basket if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) { app.UseMiddleware(); + app.UseAuthorization(); } else { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs index fce808759..709c4e7eb 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs @@ -19,6 +19,7 @@ if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) { app.UseMiddleware(); + app.UseAuthorization(); } else { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs index ae5f4453b..d5d824867 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs @@ -16,6 +16,7 @@ if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) { app.UseMiddleware(); + app.UseAuthorization(); } else { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json index 2aa46abe6..6d2d7870d 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json @@ -1,12 +1,11 @@ { + "AzureServiceBusEnabled": false, "ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word", - "MongoConnectionString": "mongodb://localhost:27017", - "MongoDatabase": "MarketingDb", + "EventBusConnection": "localhost", "IdentityUrl": "http://localhost:5105", "isTest": "true", - "EventBusConnection": "localhost", - "AzureServiceBusEnabled": false, - "SubscriptionClientName": "Marketing", + "MongoConnectionString": "mongodb://localhost:27017", + "MongoDatabase": "MarketingDb", "PicBaseUrl": "http://localhost:5110/api/v1/campaigns/[0]/pic/", "SubscriptionClientName": "Marketing" }