Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions test/e2e/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,23 @@ var _ = Describe("Podman Info", func() {
Expect(session.OutputToString()).To(Equal("netavark"))
})

It("Podman info: check default network from configuration", func() {
configPath := filepath.Join(podmanTest.TempDir, "containers.conf")

os.Setenv("CONTAINERS_CONF_OVERRIDE", configPath)

customNetName := "my-custom-test-network"
configContent := fmt.Sprintf("[network]\ndefault_network=%q\n", customNetName)

err := os.WriteFile(configPath, []byte(configContent), os.ModePerm)
Expect(err).ToNot(HaveOccurred())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I missed this before, you are going to have to add podmanTest.RestartRemoteService() after writing the file here to make the server process pick it up.

That is why the remote tests are failing


session := podmanTest.Podman([]string{"info", "--format", "{{.Host.NetworkBackendInfo.DefaultNetwork}}"})
session.WaitWithDefaultTimeout()
Expect(session).To(ExitCleanly())
Expect(session.OutputToString()).To(Equal(customNetName))
})

It("Podman info: check desired storage driver", func() {
// defined in .cirrus.yml
want := os.Getenv("CI_DESIRED_STORAGE")
Expand Down