Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit89844e5

Browse files
Merge pull request#27608 from kyounghunJang/feature/Add-DefaultNetwork
feat(info): expose default network name
2 parents8bc5591 +2e26dee commit89844e5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎test/e2e/info_test.go‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,24 @@ var _ = Describe("Podman Info", func() {
167167
Expect(session.OutputToString()).To(Equal("netavark"))
168168
})
169169

170+
It("Podman info: check default network from configuration",func() {
171+
configPath:=filepath.Join(podmanTest.TempDir,"containers.conf")
172+
173+
os.Setenv("CONTAINERS_CONF_OVERRIDE",configPath)
174+
175+
customNetName:="my-custom-test-network"
176+
configContent:=fmt.Sprintf("[network]\ndefault_network=%q\n",customNetName)
177+
178+
err:=os.WriteFile(configPath, []byte(configContent),os.ModePerm)
179+
Expect(err).ToNot(HaveOccurred())
180+
podmanTest.RestartRemoteService()
181+
182+
session:=podmanTest.Podman([]string{"info","--format","{{.Host.NetworkBackendInfo.DefaultNetwork}}"})
183+
session.WaitWithDefaultTimeout()
184+
Expect(session).To(ExitCleanly())
185+
Expect(session.OutputToString()).To(Equal(customNetName))
186+
})
187+
170188
It("Podman info: check desired storage driver",func() {
171189
// defined in .cirrus.yml
172190
want:=os.Getenv("CI_DESIRED_STORAGE")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp