public void TestDeployAppUbuntu() { Context.Configuration.AddService("my-service", "dummy-svc"); Context.Configuration.AddApp("my-app", "dummy-framework", "ubuntu"); _driver.DeployApp("my-app"); Shell.Commands.Count.ShouldBe(2); Shell.Commands[0].ShouldBe("dotnet publish -f dummy-framework -r ubuntu"); Shell.Commands[1].ShouldBe("cf push -f manifest-steeltoe.yaml -p bin/Debug/dummy-framework/ubuntu/publish"); var manifestFile = new CloudFoundryManifestFile(Path.Combine(Context.ProjectDirectory, "manifest-steeltoe.yaml")); manifestFile.Exists().ShouldBeTrue(); manifestFile.CloudFoundryManifest.Applications.Count.ShouldBe(1); var app = manifestFile.CloudFoundryManifest.Applications[0]; app.Name.ShouldBe("my-app"); app.Command.ShouldBe($"cd ${{HOME}} && ./{Path.GetFileName(Context.ProjectDirectory)}"); app.BuildPacks.Count.ShouldBe(1); app.BuildPacks[0].ShouldBe("dotnet_core_buildpack"); app.Stack.ShouldBeNull(); app.Memory.ShouldBe("512M"); app.Environment["ASPNETCORE_ENVIRONMENT"].ShouldBe("development"); app.ServiceNames[0].ShouldBe("my-service"); app.ServiceNames.Count.ShouldBe(1); }
public void TestDeployApp() { Context.Configuration.AddService("my-service", "dummy-svc"); Context.Configuration.AddApp("my-app"); _driver.DeployApp("my-app"); Shell.Commands.Count.ShouldBe(2); Shell.Commands[0].ShouldBe("dotnet publish -f netcoreapp2.1 -r win10-x64"); Shell.Commands[1].ShouldBe("cf push -f manifest-steeltoe.yml -p bin/Debug/netcoreapp2.1/win10-x64/publish"); var manifestFile = new CloudFoundryManifestFile(Path.Combine(Context.ProjectDirectory, "manifest-steeltoe.yml")); manifestFile.Exists().ShouldBeTrue(); manifestFile.CloudFoundryManifest.Applications.Count.ShouldBe(1); var app = manifestFile.CloudFoundryManifest.Applications[0]; app.Name.ShouldBe("my-app"); app.Command.ShouldBe($"cmd /c .\\{Path.GetFileName(Context.ProjectDirectory)}"); app.BuildPacks.Count.ShouldBe(1); app.BuildPacks[0].ShouldBe("binary_buildpack"); app.Stack.ShouldBe("windows2016"); app.Memory.ShouldBe("512M"); app.Environment["ASPNETCORE_ENVIRONMENT"].ShouldBe("development"); app.ServiceNames[0].ShouldBe("my-service"); app.ServiceNames.Count.ShouldBe(1); }