public void TestDeployApp() { Context.Configuration.AddApp("my-app"); _driver.DeployApp("my-app"); Shell.Commands[0].ShouldBe("dotnet publish -f netcoreapp2.1"); Shell.Commands[1].ShouldBe( $"docker run --name my-app --volume {Path.GetFullPath(Context.ProjectDirectory)}:/app --publish 8080:80 --detach --rm steeltoeoss/dotnet-runtime:2.1 dotnet /app/bin/Debug/netcoreapp2.1/publish/{Path.GetFileName(Context.ProjectDirectory)}.dll"); Shell.Commands.Count.ShouldBe(2); }
public void TestDeployApp() { Context.Configuration.AddApp("my-app", "dummy-framework", "dummy-runtime"); _driver.DeployApp("my-app"); Shell.Commands[0].ShouldBe("dotnet publish -f netcoreapp2.1"); Shell.Commands[1].ShouldBe( $"docker run --name my-app --volume {Path.GetFullPath(Context.ProjectDirectory)}:/app --workdir /app --env ASPNETCORE_ENVIRONMENT=Docker --publish 8080:80 --rm --detach steeltoeoss/dotnet-runtime:2.1 dotnet bin/Debug/netcoreapp2.1/publish/{Path.GetFileName(Context.ProjectDirectory)}.dll"); Shell.Commands[2].ShouldBe("docker network connect my-app-network my-app"); Shell.Commands.Count.ShouldBe(3); }