From 8cdfbfb9413700215292147d726885b5ab904fe7 Mon Sep 17 00:00:00 2001 From: Erik Pique Date: Tue, 20 Nov 2018 10:58:12 +0100 Subject: [PATCH 1/4] add test to CI --- docker-compose-tests.override.yml | 193 ++++++++++++++++++ docker-compose-tests.yml | 105 ++++++++++ src/Services/Basket/Basket.API/Dockerfile | 7 + src/Services/Catalog/Catalog.API/Dockerfile | 7 + src/Services/Identity/Identity.API/Dockerfile | 2 + .../Location/Locations.API/Dockerfile | 3 + .../Marketing/Marketing.API/Dockerfile | 3 + .../CampaignScenarios.cs | 2 +- .../UserLocationRoleScenarios.cs | 4 +- src/Services/Ordering/Ordering.API/Dockerfile | 7 + .../Ordering.BackgroundTasks/Dockerfile | 2 + .../Ordering/Ordering.SignalrHub/Dockerfile | 2 + src/Services/Payment/Payment.API/Dockerfile | 2 + tests-results/test-results.xml | 41 ++++ 14 files changed, 377 insertions(+), 3 deletions(-) create mode 100644 docker-compose-tests.override.yml create mode 100644 docker-compose-tests.yml create mode 100644 tests-results/test-results.xml diff --git a/docker-compose-tests.override.yml b/docker-compose-tests.override.yml new file mode 100644 index 000000000..b22402011 --- /dev/null +++ b/docker-compose-tests.override.yml @@ -0,0 +1,193 @@ +version: '3.4' + +services: + rabbitmq-test: + ports: + - "15672:15672" + - "5672:5672" + + sql-data-test: + environment: + - SA_PASSWORD=Pass@word + - ACCEPT_EULA=Y + ports: + - "5433:1433" + + nosql-data-test: + ports: + - "27017:27017" + + basket-data-test: + ports: + - "6379:6379" + + identity-api-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104 + - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback + - ConnectionString=${ESHOP_AZURE_IDENTITY_DB:-Server=sql-data-test;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} + - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 + - LocationApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5109 + - MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110 + - BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103 + - OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102 + - MobileShoppingAggClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5120 + - WebShoppingAggClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5121 + - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + ports: + - "5105:80" + + basket-api-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket-data-test} + - identityUrl=http://identity-api + - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: + - "5103:80" + entrypoint: + - dotnet + - test + - --logger + - trx;LogFileName=basket-test-results.xml + + catalog-api-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql-data-test;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word} + - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5202/api/v1/c/catalog/items/[0]/pic/} + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME} + - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY} + - UseCustomizationData=True + - AzureServiceBusEnabled=False + - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + ports: + - "5101:80" + entrypoint: + - dotnet + - test + - --logger + - trx;LogFileName=catalog-test-results.xml + + ordering-api-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql-data-test;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} + - identityUrl=http://identity-api + - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - UseCustomizationData=True + - AzureServiceBusEnabled=False + - CheckUpdateTime=30000 + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: + - "5102:80" + entrypoint: + - dotnet + - test + - --logger + - trx;LogFileName=ordering-test-results.xml + + ordering-backgroundtasks-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql-data-test;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - UseCustomizationData=True + - AzureServiceBusEnabled=False + - CheckUpdateTime=30000 + - GracePeriodTime=1 + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: + - "5111:80" + + marketing-api-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql-data-test;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word} + - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql-data-test} + - MongoDatabase=MarketingDb + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - identityUrl=http://identity-api + - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 + - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI} + - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING_URL:-http://localhost:5110/api/v1/campaigns/[0]/pic/} + - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME} + - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY} + - AzureServiceBusEnabled=False + - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: + - "5110:80" + entrypoint: + - dotnet + - test + - --logger:trx;LogFileName=marketing-test-results.xml + + payment-api-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + ports: + - "5108:80" + + locations-api-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql-data-test} + - Database=LocationsDb + - identityUrl=http://identity-api + - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: + - "5109:80" + entrypoint: + - dotnet + - test + - --logger:trx;LogFileName=locations-test-results.xml \ No newline at end of file diff --git a/docker-compose-tests.yml b/docker-compose-tests.yml new file mode 100644 index 000000000..aefea83e2 --- /dev/null +++ b/docker-compose-tests.yml @@ -0,0 +1,105 @@ +version: '3.4' + +services: + rabbitmq-test: + image: rabbitmq:3-management-alpine + + basket-data-test: + image: redis:alpine + + sql-data-test: + image: microsoft/mssql-server-linux:2017-latest + + nosql-data-test: + image: mongo + + identity-api-test: + image: eshop/identity-api-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Identity/Identity.API/Dockerfile + target: functionaltest + depends_on: + - sql-data-test + + basket-api-test: + image: eshop/basket-api-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Basket/Basket.API/Dockerfile + target: functionaltest + depends_on: + - basket-data-test + - identity-api-test + - rabbitmq-test + volumes: + - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests + + catalog-api-test: + image: eshop/catalog-api-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Catalog/Catalog.API/Dockerfile + target: functionaltest + depends_on: + - sql-data-test + - rabbitmq-test + volumes: + - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests + + ordering-api-test: + image: eshop/ordering-api-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Ordering/Ordering.API/Dockerfile + target: functionaltest + depends_on: + - sql-data-test + - rabbitmq-test + volumes: + - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests + + ordering-backgroundtasks-test: + image: eshop/ordering-backgroundtasks-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile + target: functionaltest + depends_on: + - sql-data-test + - rabbitmq-test + + marketing-api-test: + image: eshop/marketing-api-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Marketing/Marketing.API/Dockerfile + target: functionaltest + depends_on: + - sql-data-test + - nosql-data-test + - identity-api-test + - rabbitmq-test + volumes: + - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests + + payment-api-test: + image: eshop/payment-api-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Payment/Payment.API/Dockerfile + target: functionaltest + depends_on: + - rabbitmq-test + + locations-api-test: + image: eshop/locations-api-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Location/Locations.API/Dockerfile + target: functionaltest + depends_on: + - nosql-data-test + - rabbitmq-test + volumes: + - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests \ No newline at end of file diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile index 7027cfc2d..8db634288 100644 --- a/src/Services/Basket/Basket.API/Dockerfile +++ b/src/Services/Basket/Basket.API/Dockerfile @@ -9,6 +9,13 @@ WORKDIR /src/src/Services/Basket/Basket.API RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app +FROM build as functionaltest +WORKDIR /src/src/Services/Basket/Basket.FunctionalTests + +FROM build as test +WORKDIR /src/src/Services/Basket/Basket.UnitTests +RUN dotnet test --logger trx;LogFileName=basket.api.unit-test-results.xml + FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index 4cbc9c8aa..fba7ebe78 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -9,6 +9,13 @@ WORKDIR /src/src/Services/Catalog/Catalog.API RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app +FROM build as functionaltest +WORKDIR /src/src/Services/Catalog/Catalog.FunctionalTests + +FROM build as test +WORKDIR /src/src/Services/Catalog/Catalog.UnitTests +RUN dotnet test --logger trx;LogFileName=/catalog.api.unit-test-results.xml + FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile index 3f3a2a773..f50031cf1 100644 --- a/src/Services/Identity/Identity.API/Dockerfile +++ b/src/Services/Identity/Identity.API/Dockerfile @@ -12,6 +12,8 @@ WORKDIR /src/src/Services/Identity/Identity.API RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app +FROM build as functionaltest + FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Location/Locations.API/Dockerfile b/src/Services/Location/Locations.API/Dockerfile index 12ac0e442..ef9bbbc81 100644 --- a/src/Services/Location/Locations.API/Dockerfile +++ b/src/Services/Location/Locations.API/Dockerfile @@ -9,6 +9,9 @@ WORKDIR /src/src/Services/Location/Locations.API RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app +FROM build as functionaltest +WORKDIR /src/src/Services/Location/Locations.FunctionalTests + FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Marketing/Marketing.API/Dockerfile b/src/Services/Marketing/Marketing.API/Dockerfile index 75d698bfe..d047becea 100644 --- a/src/Services/Marketing/Marketing.API/Dockerfile +++ b/src/Services/Marketing/Marketing.API/Dockerfile @@ -9,6 +9,9 @@ WORKDIR /src/src/Services/Marketing/Marketing.API RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app +FROM build as functionaltest +WORKDIR /src/src/Services/Marketing/Marketing.FunctionalTests + FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Marketing/Marketing.FunctionalTests/CampaignScenarios.cs b/src/Services/Marketing/Marketing.FunctionalTests/CampaignScenarios.cs index b2b49b92e..7085e27b5 100644 --- a/src/Services/Marketing/Marketing.FunctionalTests/CampaignScenarios.cs +++ b/src/Services/Marketing/Marketing.FunctionalTests/CampaignScenarios.cs @@ -27,7 +27,7 @@ namespace Marketing.FunctionalTests [Fact] public async Task Get_get_campaign_by_id_and_response_ok_status_code() { - var campaignId = 1; + var campaignId = 81; using (var server = CreateServer()) { var response = await server.CreateClient() diff --git a/src/Services/Marketing/Marketing.FunctionalTests/UserLocationRoleScenarios.cs b/src/Services/Marketing/Marketing.FunctionalTests/UserLocationRoleScenarios.cs index 196c1b459..fa734bbdf 100644 --- a/src/Services/Marketing/Marketing.FunctionalTests/UserLocationRoleScenarios.cs +++ b/src/Services/Marketing/Marketing.FunctionalTests/UserLocationRoleScenarios.cs @@ -28,7 +28,7 @@ namespace Marketing.FunctionalTests [Fact] public async Task Post_add_new_user_location_rule_and_response_ok_status_code() { - var campaignId = 1; + var campaignId = 81; using (var server = CreateServer()) { @@ -44,7 +44,7 @@ namespace Marketing.FunctionalTests [Fact] public async Task Delete_delete_user_location_role_and_response_not_content_status_code() { - var campaignId = 1; + var campaignId = 81; using (var server = CreateServer()) { diff --git a/src/Services/Ordering/Ordering.API/Dockerfile b/src/Services/Ordering/Ordering.API/Dockerfile index 78c153641..c80a8c2ab 100644 --- a/src/Services/Ordering/Ordering.API/Dockerfile +++ b/src/Services/Ordering/Ordering.API/Dockerfile @@ -9,6 +9,13 @@ WORKDIR /src/src/Services/Ordering/Ordering.API RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app +FROM build as functionaltest +WORKDIR /src/src/Services/Ordering/Ordering.FunctionalTests + +FROM build as test +WORKDIR /src/src/Services/Ordering/Ordering.UnitTests +RUN dotnet test --logger trx;LogFileName=/ordering.api.unit-test-results.xml + FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile index 0c01dcb96..81c9a1da5 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile @@ -9,6 +9,8 @@ WORKDIR /src/src/Services/Ordering/Ordering.BackgroundTasks RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app +FROM build as functionaltest + FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile index 367b8db36..e3e17e37b 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile +++ b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile @@ -9,6 +9,8 @@ WORKDIR /src/src/Services/Ordering/Ordering.SignalrHub RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore Ordering.SignalrHub.csproj -c Release -o /app +FROM build as functionaltest + FROM build AS publish RUN dotnet publish --no-restore Ordering.SignalrHub.csproj -c Release -o /app diff --git a/src/Services/Payment/Payment.API/Dockerfile b/src/Services/Payment/Payment.API/Dockerfile index d644417c6..5a87eb016 100644 --- a/src/Services/Payment/Payment.API/Dockerfile +++ b/src/Services/Payment/Payment.API/Dockerfile @@ -9,6 +9,8 @@ WORKDIR /src/src/Services/Payment/Payment.API RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app +FROM build as functionaltest + FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/tests-results/test-results.xml b/tests-results/test-results.xml new file mode 100644 index 000000000..c005f5529 --- /dev/null +++ b/tests-results/test-results.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [xUnit.net 00:00:01.3468941] Discovering: Ordering.FunctionalTests[xUnit.net 00:00:01.3968465] Discovered: Ordering.FunctionalTests[xUnit.net 00:00:01.4008405] Starting: Ordering.FunctionalTests[xUnit.net 00:00:18.8178505] Finished: Ordering.FunctionalTests + + + \ No newline at end of file From 3011c82a0efd3812e9fb0f146dcd985957febae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Tom=C3=A1s?= Date: Tue, 27 Nov 2018 19:19:53 +0100 Subject: [PATCH 2/4] Fixed hardcoded redis connection in FunctionalTests --- .../RedisBasketRepositoryTests.cs | 64 +++++++++++-------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs b/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs index 123967558..84d41aa1a 100644 --- a/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs +++ b/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs @@ -1,5 +1,7 @@ -using Microsoft.eShopOnContainers.Services.Basket.API; +using Basket.FunctionalTests.Base; +using Microsoft.eShopOnContainers.Services.Basket.API; using Microsoft.eShopOnContainers.Services.Basket.API.Model; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Moq; @@ -13,54 +15,60 @@ using Xunit; namespace Basket.FunctionalTests { public class RedisBasketRepositoryTests + : BasketScenarioBase { - private Mock> _optionsMock; - - public RedisBasketRepositoryTests() - { - _optionsMock = new Mock>(); - } [Fact] public async Task UpdateBasket_return_and_add_basket() { - var redisBasketRepository = BuildBasketRepository(); - - var basket = await redisBasketRepository.UpdateBasketAsync(new CustomerBasket("customerId") + using (var server = CreateServer()) { - BuyerId = "buyerId", - Items = BuildBasketItems() - }); + var redis = server.Host.Services.GetRequiredService(); + + var redisBasketRepository = BuildBasketRepository(redis); - Assert.NotNull(basket); - Assert.Single(basket.Items); + var basket = await redisBasketRepository.UpdateBasketAsync(new CustomerBasket("customerId") + { + BuyerId = "buyerId", + Items = BuildBasketItems() + }); + + Assert.NotNull(basket); + Assert.Single(basket.Items); + } + + } [Fact] public async Task Delete_Basket_return_null() { - var redisBasketRepository = BuildBasketRepository(); - var basket = await redisBasketRepository.UpdateBasketAsync(new CustomerBasket("customerId") + using (var server = CreateServer()) { - BuyerId = "buyerId", - Items = BuildBasketItems() - }); + var redis = server.Host.Services.GetRequiredService(); + + var redisBasketRepository = BuildBasketRepository(redis); + + var basket = await redisBasketRepository.UpdateBasketAsync(new CustomerBasket("customerId") + { + BuyerId = "buyerId", + Items = BuildBasketItems() + }); - var deleteResult = await redisBasketRepository.DeleteBasketAsync("buyerId"); + var deleteResult = await redisBasketRepository.DeleteBasketAsync("buyerId"); - var result = await redisBasketRepository.GetBasketAsync(basket.BuyerId); + var result = await redisBasketRepository.GetBasketAsync(basket.BuyerId); - Assert.True(deleteResult); - Assert.Null(result); + Assert.True(deleteResult); + Assert.Null(result); + } } - RedisBasketRepository BuildBasketRepository() + RedisBasketRepository BuildBasketRepository(ConnectionMultiplexer connMux) { var loggerFactory = new LoggerFactory(); - var configuration = ConfigurationOptions.Parse("127.0.0.1", true); - configuration.ResolveDns = true; - return new RedisBasketRepository(loggerFactory, ConnectionMultiplexer.Connect(configuration)); + return new RedisBasketRepository(loggerFactory, connMux); } List BuildBasketItems() From 73412e267dcae941dff370e56795277ce073f8f6 Mon Sep 17 00:00:00 2001 From: Erik Pique Date: Thu, 29 Nov 2018 10:08:34 +0100 Subject: [PATCH 3/4] update test deploy --- docker-compose-tests.override.yml | 82 +++++++++++++- docker-compose-tests.yml | 39 ++++++- src/Services/Basket/Basket.API/Dockerfile | 3 +- src/Services/Catalog/Catalog.API/Dockerfile | 7 +- src/Services/Ordering/Ordering.API/Dockerfile | 3 +- tests-results/basket-test-results.xml | 105 ++++++++++++++++++ tests-results/basket-unit-test-results.xml | 105 ++++++++++++++++++ tests-results/catalog-test-results.xml | 29 +++++ tests-results/catalog-unit-test-results.xml | 29 +++++ tests-results/locations-test-results.xml | 47 ++++++++ tests-results/marketing-test-results.xml | 77 +++++++++++++ ...-results.xml => ordering-test-results.xml} | 28 ++--- tests-results/ordering-unit-test-results.xml | 41 +++++++ 13 files changed, 566 insertions(+), 29 deletions(-) create mode 100644 tests-results/basket-test-results.xml create mode 100644 tests-results/basket-unit-test-results.xml create mode 100644 tests-results/catalog-test-results.xml create mode 100644 tests-results/catalog-unit-test-results.xml create mode 100644 tests-results/locations-test-results.xml create mode 100644 tests-results/marketing-test-results.xml rename tests-results/{test-results.xml => ordering-test-results.xml} (59%) create mode 100644 tests-results/ordering-unit-test-results.xml diff --git a/docker-compose-tests.override.yml b/docker-compose-tests.override.yml index b22402011..e335feeba 100644 --- a/docker-compose-tests.override.yml +++ b/docker-compose-tests.override.yml @@ -61,7 +61,29 @@ services: - dotnet - test - --logger - - trx;LogFileName=basket-test-results.xml + - trx;LogFileName=/tests/basket-test-results.xml + + basket-api-unit-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket-data-test} + - identityUrl=http://identity-api + - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: + - "5113:80" + entrypoint: + - dotnet + - test + - --logger + - trx;LogFileName=/tests/basket-unit-test-results.xml catalog-api-test: environment: @@ -85,7 +107,31 @@ services: - dotnet - test - --logger - - trx;LogFileName=catalog-test-results.xml + - trx;LogFileName=/tests/catalog-test-results.xml + + catalog-api-unit-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql-data-test;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word} + - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5202/api/v1/c/catalog/items/[0]/pic/} + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME} + - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY} + - UseCustomizationData=True + - AzureServiceBusEnabled=False + - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + ports: + - "5191:80" + entrypoint: + - dotnet + - test + - --logger + - trx;LogFileName=/tests/catalog-unit-test-results.xml ordering-api-test: environment: @@ -109,7 +155,31 @@ services: - dotnet - test - --logger - - trx;LogFileName=ordering-test-results.xml + - trx;LogFileName=/tests/ordering-test-results.xml + + ordering-api-unit-test: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql-data-test;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} + - identityUrl=http://identity-api + - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 + - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} + - UseCustomizationData=True + - AzureServiceBusEnabled=False + - CheckUpdateTime=30000 + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: + - "5112:80" + entrypoint: + - dotnet + - test + - --logger + - trx;LogFileName=/tests/ordering-unit-test-results.xml ordering-backgroundtasks-test: environment: @@ -155,7 +225,8 @@ services: entrypoint: - dotnet - test - - --logger:trx;LogFileName=marketing-test-results.xml + - --logger + - trx;LogFileName=/tests/marketing-test-results.xml payment-api-test: environment: @@ -190,4 +261,5 @@ services: entrypoint: - dotnet - test - - --logger:trx;LogFileName=locations-test-results.xml \ No newline at end of file + - --logger + - trx;LogFileName=/tests/locations-test-results.xml \ No newline at end of file diff --git a/docker-compose-tests.yml b/docker-compose-tests.yml index aefea83e2..c636172cb 100644 --- a/docker-compose-tests.yml +++ b/docker-compose-tests.yml @@ -18,7 +18,6 @@ services: build: context: . dockerfile: src/Services/Identity/Identity.API/Dockerfile - target: functionaltest depends_on: - sql-data-test @@ -35,6 +34,19 @@ services: volumes: - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests + basket-api-unit-test: + image: eshop/basket-api-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Basket/Basket.API/Dockerfile + target: unittest + depends_on: + - basket-data-test + - identity-api-test + - rabbitmq-test + volumes: + - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests + catalog-api-test: image: eshop/catalog-api-test:${TAG:-latest} build: @@ -47,6 +59,18 @@ services: volumes: - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests + catalog-api-unit-test: + image: eshop/catalog-api-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Catalog/Catalog.API/Dockerfile + target: unittest + depends_on: + - sql-data-test + - rabbitmq-test + volumes: + - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests + ordering-api-test: image: eshop/ordering-api-test:${TAG:-latest} build: @@ -59,6 +83,18 @@ services: volumes: - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests + ordering-api-unit-test: + image: eshop/ordering-api-test:${TAG:-latest} + build: + context: . + dockerfile: src/Services/Ordering/Ordering.API/Dockerfile + target: unittest + depends_on: + - sql-data-test + - rabbitmq-test + volumes: + - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests + ordering-backgroundtasks-test: image: eshop/ordering-backgroundtasks-test:${TAG:-latest} build: @@ -88,7 +124,6 @@ services: build: context: . dockerfile: src/Services/Payment/Payment.API/Dockerfile - target: functionaltest depends_on: - rabbitmq-test diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile index 8db634288..71f85bb59 100644 --- a/src/Services/Basket/Basket.API/Dockerfile +++ b/src/Services/Basket/Basket.API/Dockerfile @@ -12,9 +12,8 @@ RUN dotnet build --no-restore -c Release -o /app FROM build as functionaltest WORKDIR /src/src/Services/Basket/Basket.FunctionalTests -FROM build as test +FROM build as unittest WORKDIR /src/src/Services/Basket/Basket.UnitTests -RUN dotnet test --logger trx;LogFileName=basket.api.unit-test-results.xml FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index fba7ebe78..1b0d05e57 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -9,13 +9,12 @@ WORKDIR /src/src/Services/Catalog/Catalog.API RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app +FROM build as unittest +WORKDIR /src/src/Services/Catalog/Catalog.UnitTests + FROM build as functionaltest WORKDIR /src/src/Services/Catalog/Catalog.FunctionalTests -FROM build as test -WORKDIR /src/src/Services/Catalog/Catalog.UnitTests -RUN dotnet test --logger trx;LogFileName=/catalog.api.unit-test-results.xml - FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Ordering/Ordering.API/Dockerfile b/src/Services/Ordering/Ordering.API/Dockerfile index c80a8c2ab..759278bc4 100644 --- a/src/Services/Ordering/Ordering.API/Dockerfile +++ b/src/Services/Ordering/Ordering.API/Dockerfile @@ -12,9 +12,8 @@ RUN dotnet build --no-restore -c Release -o /app FROM build as functionaltest WORKDIR /src/src/Services/Ordering/Ordering.FunctionalTests -FROM build as test +FROM build as unittest WORKDIR /src/src/Services/Ordering/Ordering.UnitTests -RUN dotnet test --logger trx;LogFileName=/ordering.api.unit-test-results.xml FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/tests-results/basket-test-results.xml b/tests-results/basket-test-results.xml new file mode 100644 index 000000000..e13cb7118 --- /dev/null +++ b/tests-results/basket-test-results.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + System.AggregateException : One or more errors occurred. (Connection refused) +---- System.Net.Sockets.SocketException : Connection refused + at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) + at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 874 + at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 63 + at Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 27 +--- End of stack trace from previous location where exception was thrown --- +----- Inner Stack Trace ----- + at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) + at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext) + at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) + at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP) + at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs:line 217 + at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs:line 121 + at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs:line 699 + at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs:line 67 + at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1285 + + + + + + + + + + System.AggregateException : One or more errors occurred. (Connection refused) +---- System.Net.Sockets.SocketException : Connection refused + at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) + at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 874 + at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 63 + at Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 42 +--- End of stack trace from previous location where exception was thrown --- +----- Inner Stack Trace ----- + at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) + at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext) + at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) + at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP) + at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs:line 217 + at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs:line 121 + at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs:line 699 + at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs:line 67 + at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1285 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [xUnit.net 00:00:02.7751705] Discovering: Basket.FunctionalTests[xUnit.net 00:00:02.8314243] Discovered: Basket.FunctionalTests[xUnit.net 00:00:02.8363432] Starting: Basket.FunctionalTests[xUnit.net 00:00:03.2793958] System.AggregateException : One or more errors occurred. (Connection refused)[xUnit.net 00:00:03.2795156] ---- System.Net.Sockets.SocketException : Connection refused[xUnit.net 00:00:03.2852412] Stack Trace:[xUnit.net 00:00:03.2893346] at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)[xUnit.net 00:00:03.2894905] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(874,0): at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log)[xUnit.net 00:00:03.2898636] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(63,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository()[xUnit.net 00:00:03.2899449] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(27,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket()[xUnit.net 00:00:03.2927466] --- End of stack trace from previous location where exception was thrown ---[xUnit.net 00:00:03.2928013] ----- Inner Stack Trace -----[xUnit.net 00:00:03.2928402] at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2929384] at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext)[xUnit.net 00:00:03.2930406] at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2931374] at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP)[xUnit.net 00:00:03.2932635] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs(217,0): at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log)[xUnit.net 00:00:03.2933931] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs(121,0): at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log)[xUnit.net 00:00:03.2934977] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs(699,0): at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log)[xUnit.net 00:00:03.2935555] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs(67,0): at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log)[xUnit.net 00:00:03.2936469] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(1285,0): at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags)[xUnit.net 00:00:03.3154874] System.AggregateException : One or more errors occurred. (Connection refused)[xUnit.net 00:00:03.3155323] ---- System.Net.Sockets.SocketException : Connection refused[xUnit.net 00:00:03.3156246] Stack Trace:[xUnit.net 00:00:03.3158136] at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)[xUnit.net 00:00:03.3159585] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(874,0): at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log)[xUnit.net 00:00:03.3160388] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(63,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository()[xUnit.net 00:00:03.3161725] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(42,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null()[xUnit.net 00:00:03.3162565] --- End of stack trace from previous location where exception was thrown ---[xUnit.net 00:00:03.3163422] ----- Inner Stack Trace -----[xUnit.net 00:00:03.3163900] at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)[xUnit.net 00:00:03.3164400] at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext)[xUnit.net 00:00:03.3165289] at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)[xUnit.net 00:00:03.3165627] at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP)[xUnit.net 00:00:03.3166594] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs(217,0): at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log)[xUnit.net 00:00:03.3167548] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs(121,0): at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log)[xUnit.net 00:00:03.3168335] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs(699,0): at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log)[xUnit.net 00:00:03.3172537] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs(67,0): at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log)[xUnit.net 00:00:03.3174660] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(1285,0): at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags)[xUnit.net 00:00:07.8817754] Finished: Basket.FunctionalTests + + + + [xUnit.net 00:00:03.2739919] Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket [FAIL] + + + [xUnit.net 00:00:03.3153598] Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null [FAIL] + + + + \ No newline at end of file diff --git a/tests-results/basket-unit-test-results.xml b/tests-results/basket-unit-test-results.xml new file mode 100644 index 000000000..53a30def1 --- /dev/null +++ b/tests-results/basket-unit-test-results.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + System.AggregateException : One or more errors occurred. (Connection refused) +---- System.Net.Sockets.SocketException : Connection refused + at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) + at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 874 + at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 63 + at Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 27 +--- End of stack trace from previous location where exception was thrown --- +----- Inner Stack Trace ----- + at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) + at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext) + at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) + at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP) + at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs:line 217 + at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs:line 121 + at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs:line 699 + at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs:line 67 + at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1285 + + + + + + + + + System.AggregateException : One or more errors occurred. (Connection refused) +---- System.Net.Sockets.SocketException : Connection refused + at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) + at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 874 + at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 63 + at Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 42 +--- End of stack trace from previous location where exception was thrown --- +----- Inner Stack Trace ----- + at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) + at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext) + at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) + at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP) + at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs:line 217 + at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs:line 121 + at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs:line 699 + at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs:line 67 + at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1285 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [xUnit.net 00:00:02.4742360] Discovering: Basket.FunctionalTests[xUnit.net 00:00:02.5727110] Discovered: Basket.FunctionalTests[xUnit.net 00:00:02.5783146] Starting: Basket.FunctionalTests[xUnit.net 00:00:03.2222534] System.AggregateException : One or more errors occurred. (Connection refused)[xUnit.net 00:00:03.2223840] ---- System.Net.Sockets.SocketException : Connection refused[xUnit.net 00:00:03.2253023] Stack Trace:[xUnit.net 00:00:03.2265453] at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)[xUnit.net 00:00:03.2266545] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(874,0): at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log)[xUnit.net 00:00:03.2269067] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(63,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository()[xUnit.net 00:00:03.2269908] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(27,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket()[xUnit.net 00:00:03.2270384] --- End of stack trace from previous location where exception was thrown ---[xUnit.net 00:00:03.2329249] ----- Inner Stack Trace -----[xUnit.net 00:00:03.2330124] at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2330637] at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext)[xUnit.net 00:00:03.2331065] at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2331416] at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP)[xUnit.net 00:00:03.2331914] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs(217,0): at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log)[xUnit.net 00:00:03.2332449] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs(121,0): at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log)[xUnit.net 00:00:03.2332942] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs(699,0): at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log)[xUnit.net 00:00:03.2333421] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs(67,0): at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log)[xUnit.net 00:00:03.2334035] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(1285,0): at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags)[xUnit.net 00:00:03.2597410] System.AggregateException : One or more errors occurred. (Connection refused)[xUnit.net 00:00:03.2602061] ---- System.Net.Sockets.SocketException : Connection refused[xUnit.net 00:00:03.2611373] Stack Trace:[xUnit.net 00:00:03.2612811] at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)[xUnit.net 00:00:03.2613456] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(874,0): at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log)[xUnit.net 00:00:03.2614004] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(63,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository()[xUnit.net 00:00:03.2614553] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(42,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null()[xUnit.net 00:00:03.2639601] --- End of stack trace from previous location where exception was thrown ---[xUnit.net 00:00:03.2641794] ----- Inner Stack Trace -----[xUnit.net 00:00:03.2642424] at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2642850] at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext)[xUnit.net 00:00:03.2643282] at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2643613] at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP)[xUnit.net 00:00:03.2644095] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs(217,0): at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log)[xUnit.net 00:00:03.2644721] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs(121,0): at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log)[xUnit.net 00:00:03.2645212] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs(699,0): at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log)[xUnit.net 00:00:03.2645704] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs(67,0): at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log)[xUnit.net 00:00:03.2646199] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(1285,0): at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags)[xUnit.net 00:00:07.4722285] Finished: Basket.FunctionalTests + + + + [xUnit.net 00:00:03.2180801] Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket [FAIL] + + + [xUnit.net 00:00:03.2591737] Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null [FAIL] + + + + \ No newline at end of file diff --git a/tests-results/catalog-test-results.xml b/tests-results/catalog-test-results.xml new file mode 100644 index 000000000..2556db540 --- /dev/null +++ b/tests-results/catalog-test-results.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + [xUnit.net 00:00:01.8996469] Discovering: Catalog.UnitTests[xUnit.net 00:00:01.9932494] Discovered: Catalog.UnitTests[xUnit.net 00:00:02.0007385] Starting: Catalog.UnitTests[xUnit.net 00:00:02.5315257] Finished: Catalog.UnitTests + + + \ No newline at end of file diff --git a/tests-results/catalog-unit-test-results.xml b/tests-results/catalog-unit-test-results.xml new file mode 100644 index 000000000..de5ff2337 --- /dev/null +++ b/tests-results/catalog-unit-test-results.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + [xUnit.net 00:00:01.9223351] Discovering: Catalog.UnitTests[xUnit.net 00:00:01.9987338] Discovered: Catalog.UnitTests[xUnit.net 00:00:02.0050223] Starting: Catalog.UnitTests[xUnit.net 00:00:02.5865186] Finished: Catalog.UnitTests + + + \ No newline at end of file diff --git a/tests-results/locations-test-results.xml b/tests-results/locations-test-results.xml new file mode 100644 index 000000000..b799d1a50 --- /dev/null +++ b/tests-results/locations-test-results.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [xUnit.net 00:00:01.5159078] Discovering: Locations.FunctionalTests[xUnit.net 00:00:01.5714633] Discovered: Locations.FunctionalTests[xUnit.net 00:00:01.5764524] Starting: Locations.FunctionalTests[xUnit.net 00:00:06.0049609] Finished: Locations.FunctionalTests + + + \ No newline at end of file diff --git a/tests-results/marketing-test-results.xml b/tests-results/marketing-test-results.xml new file mode 100644 index 000000000..5545febcc --- /dev/null +++ b/tests-results/marketing-test-results.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [xUnit.net 00:00:01.0963036] Discovering: Marketing.FunctionalTests[xUnit.net 00:00:01.1452772] Discovered: Marketing.FunctionalTests[xUnit.net 00:00:01.1494340] Starting: Marketing.FunctionalTests[xUnit.net 00:00:06.9663675] Finished: Marketing.FunctionalTests + + + \ No newline at end of file diff --git a/tests-results/test-results.xml b/tests-results/ordering-test-results.xml similarity index 59% rename from tests-results/test-results.xml rename to tests-results/ordering-test-results.xml index c005f5529..d6291e668 100644 --- a/tests-results/test-results.xml +++ b/tests-results/ordering-test-results.xml @@ -1,32 +1,32 @@  - - - - + + + + - - - + + + - + - + - + - - - + + + @@ -35,7 +35,7 @@ - [xUnit.net 00:00:01.3468941] Discovering: Ordering.FunctionalTests[xUnit.net 00:00:01.3968465] Discovered: Ordering.FunctionalTests[xUnit.net 00:00:01.4008405] Starting: Ordering.FunctionalTests[xUnit.net 00:00:18.8178505] Finished: Ordering.FunctionalTests + [xUnit.net 00:00:01.9383086] Discovering: Ordering.FunctionalTests[xUnit.net 00:00:02.0352782] Discovered: Ordering.FunctionalTests[xUnit.net 00:00:02.0409647] Starting: Ordering.FunctionalTests[xUnit.net 00:00:23.6771817] Finished: Ordering.FunctionalTests \ No newline at end of file diff --git a/tests-results/ordering-unit-test-results.xml b/tests-results/ordering-unit-test-results.xml new file mode 100644 index 000000000..9809a3e23 --- /dev/null +++ b/tests-results/ordering-unit-test-results.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [xUnit.net 00:00:01.8313240] Discovering: Ordering.FunctionalTests[xUnit.net 00:00:01.9355197] Discovered: Ordering.FunctionalTests[xUnit.net 00:00:01.9423221] Starting: Ordering.FunctionalTests[xUnit.net 00:00:20.6671867] Finished: Ordering.FunctionalTests + + + \ No newline at end of file From 82bda5cdbf5dfb4153f49da31edd73b2ab797d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Tom=C3=A1s?= Date: Wed, 5 Dec 2018 13:00:02 +0100 Subject: [PATCH 4/4] Updated tests --- docker-compose-tests.override.yml | 20 +-- docker-compose-tests.yml | 12 +- src/Services/Identity/Identity.API/Dockerfile | 2 - .../Ordering.BackgroundTasks/Dockerfile | 2 - .../Ordering/Ordering.SignalrHub/Dockerfile | 2 - src/Services/Payment/Payment.API/Dockerfile | 2 - tests-results/basket-test-results.xml | 128 ++++++------------ tests-results/basket-unit-test-results.xml | 128 ++++++------------ tests-results/catalog-test-results.xml | 82 +++++++++-- tests-results/catalog-unit-test-results.xml | 82 +++++++++-- tests-results/locations-test-results.xml | 34 ++--- tests-results/ordering-test-results.xml | 28 ++-- tests-results/ordering-unit-test-results.xml | 28 ++-- 13 files changed, 277 insertions(+), 273 deletions(-) diff --git a/docker-compose-tests.override.yml b/docker-compose-tests.override.yml index e335feeba..8705e703f 100644 --- a/docker-compose-tests.override.yml +++ b/docker-compose-tests.override.yml @@ -179,25 +179,7 @@ services: - dotnet - test - --logger - - trx;LogFileName=/tests/ordering-unit-test-results.xml - - ordering-backgroundtasks-test: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql-data-test;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq-test} - - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} - - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - - UseCustomizationData=True - - AzureServiceBusEnabled=False - - CheckUpdateTime=30000 - - GracePeriodTime=1 - - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} - - OrchestratorType=${ORCHESTRATOR_TYPE} - - UseLoadTest=${USE_LOADTEST:-False} - ports: - - "5111:80" + - trx;LogFileName=/tests/ordering-unit-test-results.xml marketing-api-test: environment: diff --git a/docker-compose-tests.yml b/docker-compose-tests.yml index c636172cb..d05f7e27e 100644 --- a/docker-compose-tests.yml +++ b/docker-compose-tests.yml @@ -93,17 +93,7 @@ services: - sql-data-test - rabbitmq-test volumes: - - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests - - ordering-backgroundtasks-test: - image: eshop/ordering-backgroundtasks-test:${TAG:-latest} - build: - context: . - dockerfile: src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile - target: functionaltest - depends_on: - - sql-data-test - - rabbitmq-test + - ${BUILD_ARTIFACTSTAGINGDIRECTORY:-./tests-results/}:/tests marketing-api-test: image: eshop/marketing-api-test:${TAG:-latest} diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile index f50031cf1..3f3a2a773 100644 --- a/src/Services/Identity/Identity.API/Dockerfile +++ b/src/Services/Identity/Identity.API/Dockerfile @@ -12,8 +12,6 @@ WORKDIR /src/src/Services/Identity/Identity.API RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app -FROM build as functionaltest - FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile index 81c9a1da5..0c01dcb96 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile @@ -9,8 +9,6 @@ WORKDIR /src/src/Services/Ordering/Ordering.BackgroundTasks RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app -FROM build as functionaltest - FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile index e3e17e37b..367b8db36 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile +++ b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile @@ -9,8 +9,6 @@ WORKDIR /src/src/Services/Ordering/Ordering.SignalrHub RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore Ordering.SignalrHub.csproj -c Release -o /app -FROM build as functionaltest - FROM build AS publish RUN dotnet publish --no-restore Ordering.SignalrHub.csproj -c Release -o /app diff --git a/src/Services/Payment/Payment.API/Dockerfile b/src/Services/Payment/Payment.API/Dockerfile index 5a87eb016..d644417c6 100644 --- a/src/Services/Payment/Payment.API/Dockerfile +++ b/src/Services/Payment/Payment.API/Dockerfile @@ -9,8 +9,6 @@ WORKDIR /src/src/Services/Payment/Payment.API RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app -FROM build as functionaltest - FROM build AS publish RUN dotnet publish --no-restore -c Release -o /app diff --git a/tests-results/basket-test-results.xml b/tests-results/basket-test-results.xml index e13cb7118..933ed1b5b 100644 --- a/tests-results/basket-test-results.xml +++ b/tests-results/basket-test-results.xml @@ -1,105 +1,65 @@  - - - - + + + + - - - - System.AggregateException : One or more errors occurred. (Connection refused) ----- System.Net.Sockets.SocketException : Connection refused - at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) - at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 874 - at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 63 - at Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 27 ---- End of stack trace from previous location where exception was thrown --- ------ Inner Stack Trace ----- - at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) - at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext) - at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) - at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP) - at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs:line 217 - at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs:line 121 - at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs:line 699 - at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs:line 67 - at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1285 - - - - - - - - - - System.AggregateException : One or more errors occurred. (Connection refused) ----- System.Net.Sockets.SocketException : Connection refused - at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) - at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 874 - at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 63 - at Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 42 ---- End of stack trace from previous location where exception was thrown --- ------ Inner Stack Trace ----- - at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) - at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext) - at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) - at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP) - at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs:line 217 - at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs:line 121 - at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs:line 699 - at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs:line 67 - at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1285 - - - + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + - - - - - + + + + + + + - - + + - [xUnit.net 00:00:02.7751705] Discovering: Basket.FunctionalTests[xUnit.net 00:00:02.8314243] Discovered: Basket.FunctionalTests[xUnit.net 00:00:02.8363432] Starting: Basket.FunctionalTests[xUnit.net 00:00:03.2793958] System.AggregateException : One or more errors occurred. (Connection refused)[xUnit.net 00:00:03.2795156] ---- System.Net.Sockets.SocketException : Connection refused[xUnit.net 00:00:03.2852412] Stack Trace:[xUnit.net 00:00:03.2893346] at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)[xUnit.net 00:00:03.2894905] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(874,0): at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log)[xUnit.net 00:00:03.2898636] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(63,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository()[xUnit.net 00:00:03.2899449] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(27,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket()[xUnit.net 00:00:03.2927466] --- End of stack trace from previous location where exception was thrown ---[xUnit.net 00:00:03.2928013] ----- Inner Stack Trace -----[xUnit.net 00:00:03.2928402] at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2929384] at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext)[xUnit.net 00:00:03.2930406] at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2931374] at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP)[xUnit.net 00:00:03.2932635] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs(217,0): at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log)[xUnit.net 00:00:03.2933931] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs(121,0): at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log)[xUnit.net 00:00:03.2934977] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs(699,0): at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log)[xUnit.net 00:00:03.2935555] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs(67,0): at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log)[xUnit.net 00:00:03.2936469] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(1285,0): at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags)[xUnit.net 00:00:03.3154874] System.AggregateException : One or more errors occurred. (Connection refused)[xUnit.net 00:00:03.3155323] ---- System.Net.Sockets.SocketException : Connection refused[xUnit.net 00:00:03.3156246] Stack Trace:[xUnit.net 00:00:03.3158136] at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)[xUnit.net 00:00:03.3159585] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(874,0): at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log)[xUnit.net 00:00:03.3160388] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(63,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository()[xUnit.net 00:00:03.3161725] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(42,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null()[xUnit.net 00:00:03.3162565] --- End of stack trace from previous location where exception was thrown ---[xUnit.net 00:00:03.3163422] ----- Inner Stack Trace -----[xUnit.net 00:00:03.3163900] at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)[xUnit.net 00:00:03.3164400] at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext)[xUnit.net 00:00:03.3165289] at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)[xUnit.net 00:00:03.3165627] at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP)[xUnit.net 00:00:03.3166594] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs(217,0): at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log)[xUnit.net 00:00:03.3167548] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs(121,0): at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log)[xUnit.net 00:00:03.3168335] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs(699,0): at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log)[xUnit.net 00:00:03.3172537] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs(67,0): at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log)[xUnit.net 00:00:03.3174660] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(1285,0): at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags)[xUnit.net 00:00:07.8817754] Finished: Basket.FunctionalTests + [xUnit.net 00:00:06.1434181] Discovering: Basket.UnitTests[xUnit.net 00:00:06.4201662] Discovered: Basket.UnitTests[xUnit.net 00:00:06.4258049] Starting: Basket.UnitTests[xUnit.net 00:00:09.1721258] Finished: Basket.UnitTests - - - [xUnit.net 00:00:03.2739919] Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket [FAIL] - - - [xUnit.net 00:00:03.3153598] Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null [FAIL] - - \ No newline at end of file diff --git a/tests-results/basket-unit-test-results.xml b/tests-results/basket-unit-test-results.xml index 53a30def1..c7a6cd004 100644 --- a/tests-results/basket-unit-test-results.xml +++ b/tests-results/basket-unit-test-results.xml @@ -1,105 +1,65 @@  - - - - + + + + - - - - - System.AggregateException : One or more errors occurred. (Connection refused) ----- System.Net.Sockets.SocketException : Connection refused - at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) - at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 874 - at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 63 - at Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 27 ---- End of stack trace from previous location where exception was thrown --- ------ Inner Stack Trace ----- - at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) - at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext) - at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) - at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP) - at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs:line 217 - at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs:line 121 - at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs:line 699 - at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs:line 67 - at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1285 - - - - - - - - - System.AggregateException : One or more errors occurred. (Connection refused) ----- System.Net.Sockets.SocketException : Connection refused - at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) - at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 874 - at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 63 - at Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null() in /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs:line 42 ---- End of stack trace from previous location where exception was thrown --- ------ Inner Stack Trace ----- - at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) - at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext) - at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) - at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP) - at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs:line 217 - at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs:line 121 - at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs:line 699 - at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs:line 67 - at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1285 - - - + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + - - - - - + + + + + + + - - + + - [xUnit.net 00:00:02.4742360] Discovering: Basket.FunctionalTests[xUnit.net 00:00:02.5727110] Discovered: Basket.FunctionalTests[xUnit.net 00:00:02.5783146] Starting: Basket.FunctionalTests[xUnit.net 00:00:03.2222534] System.AggregateException : One or more errors occurred. (Connection refused)[xUnit.net 00:00:03.2223840] ---- System.Net.Sockets.SocketException : Connection refused[xUnit.net 00:00:03.2253023] Stack Trace:[xUnit.net 00:00:03.2265453] at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)[xUnit.net 00:00:03.2266545] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(874,0): at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log)[xUnit.net 00:00:03.2269067] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(63,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository()[xUnit.net 00:00:03.2269908] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(27,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket()[xUnit.net 00:00:03.2270384] --- End of stack trace from previous location where exception was thrown ---[xUnit.net 00:00:03.2329249] ----- Inner Stack Trace -----[xUnit.net 00:00:03.2330124] at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2330637] at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext)[xUnit.net 00:00:03.2331065] at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2331416] at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP)[xUnit.net 00:00:03.2331914] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs(217,0): at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log)[xUnit.net 00:00:03.2332449] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs(121,0): at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log)[xUnit.net 00:00:03.2332942] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs(699,0): at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log)[xUnit.net 00:00:03.2333421] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs(67,0): at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log)[xUnit.net 00:00:03.2334035] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(1285,0): at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags)[xUnit.net 00:00:03.2597410] System.AggregateException : One or more errors occurred. (Connection refused)[xUnit.net 00:00:03.2602061] ---- System.Net.Sockets.SocketException : Connection refused[xUnit.net 00:00:03.2611373] Stack Trace:[xUnit.net 00:00:03.2612811] at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)[xUnit.net 00:00:03.2613456] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(874,0): at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log)[xUnit.net 00:00:03.2614004] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(63,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.BuildBasketRepository()[xUnit.net 00:00:03.2614553] /src/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs(42,0): at Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null()[xUnit.net 00:00:03.2639601] --- End of stack trace from previous location where exception was thrown ---[xUnit.net 00:00:03.2641794] ----- Inner Stack Trace -----[xUnit.net 00:00:03.2642424] at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2642850] at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext)[xUnit.net 00:00:03.2643282] at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)[xUnit.net 00:00:03.2643613] at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP)[xUnit.net 00:00:03.2644095] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\SocketManager.cs(217,0): at StackExchange.Redis.SocketManager.BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log)[xUnit.net 00:00:03.2644721] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs(121,0): at StackExchange.Redis.PhysicalConnection.BeginConnect(TextWriter log)[xUnit.net 00:00:03.2645212] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\PhysicalBridge.cs(699,0): at StackExchange.Redis.PhysicalBridge.GetConnection(TextWriter log)[xUnit.net 00:00:03.2645704] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ServerEndPoint.cs(67,0): at StackExchange.Redis.ServerEndPoint..ctor(ConnectionMultiplexer multiplexer, EndPoint endpoint, TextWriter log)[xUnit.net 00:00:03.2646199] c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs(1285,0): at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags)[xUnit.net 00:00:07.4722285] Finished: Basket.FunctionalTests + [xUnit.net 00:00:06.7811016] Discovering: Basket.UnitTests[xUnit.net 00:00:07.1809374] Discovered: Basket.UnitTests[xUnit.net 00:00:07.1870723] Starting: Basket.UnitTests[xUnit.net 00:00:10.4183620] Finished: Basket.UnitTests - - - [xUnit.net 00:00:03.2180801] Basket.FunctionalTests.RedisBasketRepositoryTests.UpdateBasket_return_and_add_basket [FAIL] - - - [xUnit.net 00:00:03.2591737] Basket.FunctionalTests.RedisBasketRepositoryTests.Delete_Basket_return_null [FAIL] - - \ No newline at end of file diff --git a/tests-results/catalog-test-results.xml b/tests-results/catalog-test-results.xml index 2556db540..73efaeb8f 100644 --- a/tests-results/catalog-test-results.xml +++ b/tests-results/catalog-test-results.xml @@ -1,29 +1,89 @@  - - - - + + + + - + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + - [xUnit.net 00:00:01.8996469] Discovering: Catalog.UnitTests[xUnit.net 00:00:01.9932494] Discovered: Catalog.UnitTests[xUnit.net 00:00:02.0007385] Starting: Catalog.UnitTests[xUnit.net 00:00:02.5315257] Finished: Catalog.UnitTests + [xUnit.net 00:00:06.0723374] Discovering: Catalog.FunctionalTests[xUnit.net 00:00:06.4361995] Discovered: Catalog.FunctionalTests[xUnit.net 00:00:06.4447894] Starting: Catalog.FunctionalTests[xUnit.net 00:00:34.5834045] Finished: Catalog.FunctionalTests \ No newline at end of file diff --git a/tests-results/catalog-unit-test-results.xml b/tests-results/catalog-unit-test-results.xml index de5ff2337..2bc65d5c9 100644 --- a/tests-results/catalog-unit-test-results.xml +++ b/tests-results/catalog-unit-test-results.xml @@ -1,29 +1,89 @@  - - - - + + + + - + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + - [xUnit.net 00:00:01.9223351] Discovering: Catalog.UnitTests[xUnit.net 00:00:01.9987338] Discovered: Catalog.UnitTests[xUnit.net 00:00:02.0050223] Starting: Catalog.UnitTests[xUnit.net 00:00:02.5865186] Finished: Catalog.UnitTests + [xUnit.net 00:00:06.6354381] Discovering: Catalog.FunctionalTests[xUnit.net 00:00:07.0010904] Discovered: Catalog.FunctionalTests[xUnit.net 00:00:07.0749761] Starting: Catalog.FunctionalTests[xUnit.net 00:00:34.9063753] Finished: Catalog.FunctionalTests \ No newline at end of file diff --git a/tests-results/locations-test-results.xml b/tests-results/locations-test-results.xml index b799d1a50..c8b5e6b82 100644 --- a/tests-results/locations-test-results.xml +++ b/tests-results/locations-test-results.xml @@ -1,38 +1,38 @@  - - - - + + + + - - - - + + + + - + - + - + - + - - - - + + + + @@ -41,7 +41,7 @@ - [xUnit.net 00:00:01.5159078] Discovering: Locations.FunctionalTests[xUnit.net 00:00:01.5714633] Discovered: Locations.FunctionalTests[xUnit.net 00:00:01.5764524] Starting: Locations.FunctionalTests[xUnit.net 00:00:06.0049609] Finished: Locations.FunctionalTests + [xUnit.net 00:00:07.7665792] Discovering: Locations.FunctionalTests[xUnit.net 00:00:08.1972548] Discovered: Locations.FunctionalTests[xUnit.net 00:00:08.2137816] Starting: Locations.FunctionalTests[xUnit.net 00:00:27.6429580] Finished: Locations.FunctionalTests \ No newline at end of file diff --git a/tests-results/ordering-test-results.xml b/tests-results/ordering-test-results.xml index d6291e668..231975d56 100644 --- a/tests-results/ordering-test-results.xml +++ b/tests-results/ordering-test-results.xml @@ -1,32 +1,32 @@  - - - - + + + + - - - + + + - + - + - + - - - + + + @@ -35,7 +35,7 @@ - [xUnit.net 00:00:01.9383086] Discovering: Ordering.FunctionalTests[xUnit.net 00:00:02.0352782] Discovered: Ordering.FunctionalTests[xUnit.net 00:00:02.0409647] Starting: Ordering.FunctionalTests[xUnit.net 00:00:23.6771817] Finished: Ordering.FunctionalTests + [xUnit.net 00:00:05.2039980] Discovering: Ordering.FunctionalTests[xUnit.net 00:00:05.4802527] Discovered: Ordering.FunctionalTests[xUnit.net 00:00:05.5249888] Starting: Ordering.FunctionalTests[xUnit.net 00:00:20.1396674] Finished: Ordering.FunctionalTests \ No newline at end of file diff --git a/tests-results/ordering-unit-test-results.xml b/tests-results/ordering-unit-test-results.xml index 9809a3e23..c9f85a60f 100644 --- a/tests-results/ordering-unit-test-results.xml +++ b/tests-results/ordering-unit-test-results.xml @@ -1,32 +1,32 @@  - - - - + + + + - - - + + + - + - + - + - - - + + + @@ -35,7 +35,7 @@ - [xUnit.net 00:00:01.8313240] Discovering: Ordering.FunctionalTests[xUnit.net 00:00:01.9355197] Discovered: Ordering.FunctionalTests[xUnit.net 00:00:01.9423221] Starting: Ordering.FunctionalTests[xUnit.net 00:00:20.6671867] Finished: Ordering.FunctionalTests + [xUnit.net 00:00:05.4257955] Discovering: Ordering.FunctionalTests[xUnit.net 00:00:05.9560169] Discovered: Ordering.FunctionalTests[xUnit.net 00:00:05.9845906] Starting: Ordering.FunctionalTests[xUnit.net 00:00:21.2769127] Finished: Ordering.FunctionalTests \ No newline at end of file