File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,23 @@ 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]\n default_network=%q\n " , customNetName )
177+
178+ err := os .WriteFile (configPath , []byte (configContent ), os .ModePerm )
179+ Expect (err ).ToNot (HaveOccurred ())
180+
181+ session := podmanTest .Podman ([]string {"info" , "--format" , "{{.Host.NetworkBackendInfo.DefaultNetwork}}" })
182+ session .WaitWithDefaultTimeout ()
183+ Expect (session ).To (ExitCleanly ())
184+ Expect (session .OutputToString ()).To (Equal (customNetName ))
185+ })
186+
170187 It ("Podman info: check desired storage driver" , func () {
171188 // defined in .cirrus.yml
172189 want := os .Getenv ("CI_DESIRED_STORAGE" )
You can’t perform that action at this time.
0 commit comments