podman volume create --opt=o=timeout...

add an option to configure the driver timeout when creating a volume.
The default is 5 seconds but this value is too small for some custom drivers.

Signed-off-by: cdoern <cdoern@redhat.com>
This commit is contained in:
cdoern
2022-06-01 16:02:39 -04:00
parent f808907d85
commit 7b3e43c1f6
12 changed files with 60 additions and 9 deletions

View File

@@ -162,4 +162,19 @@ var _ = Describe("Podman volume create", func() {
Expect(inspectOpts).Should(Exit(0))
Expect(inspectOpts.OutputToString()).To(Equal(optionStrFormatExpect))
})
It("podman create volume with o=timeout", func() {
volName := "testVol"
timeout := 10
timeoutStr := "10"
session := podmanTest.Podman([]string{"volume", "create", "--opt", fmt.Sprintf("o=timeout=%d", timeout), volName})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
inspectTimeout := podmanTest.Podman([]string{"volume", "inspect", "--format", "{{ .Timeout }}", volName})
inspectTimeout.WaitWithDefaultTimeout()
Expect(inspectTimeout).Should(Exit(0))
Expect(inspectTimeout.OutputToString()).To(Equal(timeoutStr))
})
})