diff --git a/docker-compose.dcproj b/docker-compose.dcproj
index 92590035d..23547b577 100644
--- a/docker-compose.dcproj
+++ b/docker-compose.dcproj
@@ -15,12 +15,6 @@
docker-compose.yml
-
-
- docker-compose.yml
-
-
- docker-compose.yml
diff --git a/docker-compose.vs.debug.yml b/docker-compose.vs.debug.yml
deleted file mode 100644
index 9c4879f61..000000000
--- a/docker-compose.vs.debug.yml
+++ /dev/null
@@ -1,166 +0,0 @@
-version: '2.1'
-
-services:
- basket.api:
- image: eshop/basket.api:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- environment:
- - DOTNET_USE_POLLING_FILE_WATCHER=1
- volumes:
- - ./src/Services/Basket/Basket.API:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- catalog.api:
- image: eshop/catalog.api:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- environment:
- - DOTNET_USE_POLLING_FILE_WATCHER=1
- volumes:
- - ./src/Services/Catalog/Catalog.API:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- identity.api:
- image: eshop/identity.api:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- environment:
- - DOTNET_USE_POLLING_FILE_WATCHER=1
- volumes:
- - ./src/Services/Identity/Identity.API:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- ordering.api:
- image: eshop/ordering.api:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- environment:
- - DOTNET_USE_POLLING_FILE_WATCHER=1
- volumes:
- - ./src/Services/Ordering/Ordering.API:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- marketing.api:
- image: eshop/marketing.api:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- environment:
- - DOTNET_USE_POLLING_FILE_WATCHER=1
- volumes:
- - ./src/Services/Marketing/Marketing.API:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
-
- webspa:
- image: eshop/webspa:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- environment:
- - DOTNET_USE_POLLING_FILE_WATCHER=1
- volumes:
- - ./src/Web/WebSPA:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- webmvc:
- image: eshop/webmvc:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- environment:
- - DOTNET_USE_POLLING_FILE_WATCHER=1
- volumes:
- - ./src/Web/WebMVC:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- webstatus:
- image: eshop/webstatus:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- environment:
- - DOTNET_USE_POLLING_FILE_WATCHER=1
- volumes:
- - ./src/Web/WebStatus:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- payment.api:
- image: eshop/payment.api:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- environment:
- - DOTNET_USE_POLLING_FILE_WATCHER=1
- volumes:
- - ./src/Services/Payment/Payment.API:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- graceperiodmanager:
- image: eshop/graceperiodmanager:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ./src/Services/GracePeriod/GracePeriodManager:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- locations.api:
- image: eshop/locations.api:dev
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- environment:
- - DOTNET_USE_POLLING_FILE_WATCHER=1
- volumes:
- - ./src/Services/Location/Locations.API:/app
- - ~/.nuget/packages:/root/.nuget/packages:ro
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
diff --git a/docker-compose.vs.release.yml b/docker-compose.vs.release.yml
deleted file mode 100644
index 92be2557b..000000000
--- a/docker-compose.vs.release.yml
+++ /dev/null
@@ -1,112 +0,0 @@
-version: '2.1'
-
-services:
- basket.api:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- catalog.api:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- identity.api:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- ordering.api:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- marketing.api:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- webspa:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- webmvc:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- webstatus:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- payment.api:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- graceperiodmanager:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
-
- locations.api:
- build:
- args:
- source: ${DOCKER_BUILD_SOURCE}
- volumes:
- - ~/clrdbg:/clrdbg:ro
- entrypoint: tail -f /dev/null
- labels:
- - "com.microsoft.visualstudio.targetoperatingsystem=linux"
diff --git a/src/Web/WebMVC/Controllers/AccountController.cs b/src/Web/WebMVC/Controllers/AccountController.cs
index 9ec896e13..6650fdb9f 100644
--- a/src/Web/WebMVC/Controllers/AccountController.cs
+++ b/src/Web/WebMVC/Controllers/AccountController.cs
@@ -9,7 +9,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
{
[Authorize]
public class AccountController : Controller
- {
+ {
[Authorize]
public async Task SignIn(string returnUrl)
{
diff --git a/test/Services/UnitTest/Account/AccountControllerTest.cs b/test/Services/UnitTest/Account/AccountControllerTest.cs
index 8542cca0e..0fa4402d3 100644
--- a/test/Services/UnitTest/Account/AccountControllerTest.cs
+++ b/test/Services/UnitTest/Account/AccountControllerTest.cs
@@ -1,4 +1,6 @@
-using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Authentication;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Http.Authentication;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.Controllers;
using Microsoft.eShopOnContainers.WebMVC.Services;
@@ -15,12 +17,10 @@ namespace UnitTest.Account
{
public class AccountControllerTest
{
- private readonly Mock> _identityParserMock;
private readonly Mock _httpContextMock;
public AccountControllerTest()
{
- _identityParserMock = new Mock>();
_httpContextMock = new Mock();
}
@@ -29,20 +29,23 @@ namespace UnitTest.Account
{
//Arrange
var fakeCP = GenerateFakeClaimsIdentity();
+ var mockAuth = new Mock();
_httpContextMock.Setup(x => x.User)
.Returns(new ClaimsPrincipal(fakeCP));
-
+
+ _httpContextMock.Setup(c => c.Authentication)
+ .Returns(mockAuth.Object);
+
//Act
- var accountController = new AccountController(_identityParserMock.Object);
+ var accountController = new AccountController();
accountController.ControllerContext.HttpContext = _httpContextMock.Object;
- var actionResult = accountController.SignIn("");
+ var actionResult = accountController.SignIn("").Result;
//Assert
var redirectResult = Assert.IsType(actionResult);
Assert.Equal(redirectResult.ActionName, "Index");
Assert.Equal(redirectResult.ControllerName, "Catalog");
- Assert.Equal(accountController.ViewData["access_token"], "fakeToken");
}
private ClaimsIdentity GenerateFakeClaimsIdentity()