Skip to content

Commit 576cefb

Browse files
author
v-wuzhai
authored
[automated] Merge branch 'release/9.0.1xx' => 'release/9.0.2xx' (#45860)
2 parents a5c6b36 + 30078a2 commit 576cefb

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,39 @@ public void EndToEnd_NoAPI_Console(string baseImage)
690690
privateNuGetAssets.Delete(true);
691691
}
692692

693+
[DockerAvailableFact]
694+
public void EndToEnd_SingleArch_NoRid()
695+
{
696+
// Create a new console project
697+
DirectoryInfo newProjectDir = CreateNewProject("console");
698+
699+
string imageName = NewImageName();
700+
string imageTag = "1.0";
701+
702+
// Run PublishContainer for multi-arch
703+
CommandResult commandResult = new DotnetCommand(
704+
_testOutput,
705+
"publish",
706+
"/t:PublishContainer",
707+
$"/p:ContainerBaseImage={DockerRegistryManager.FullyQualifiedBaseImageAspNet}",
708+
$"/p:ContainerRepository={imageName}",
709+
$"/p:ContainerImageTag={imageTag}",
710+
"/p:EnableSdkContainerSupport=true")
711+
.WithWorkingDirectory(newProjectDir.FullName)
712+
.Execute();
713+
commandResult.Should().Pass();
714+
715+
// Check that the containers can be run
716+
CommandResult processResultX64 = ContainerCli.RunCommand(
717+
_testOutput,
718+
"--rm",
719+
"--name",
720+
$"test-container-singlearch-norid",
721+
$"{imageName}:{imageTag}")
722+
.Execute();
723+
processResultX64.Should().Pass().And.HaveStdOut("Hello, World!");
724+
}
725+
693726
[DockerIsAvailableAndSupportsArchFact("linux/arm64")]
694727
public void EndToEndMultiArch_LocalRegistry()
695728
{

0 commit comments

Comments
 (0)