diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-17 17:22:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 17:22:37 +0000 |
commit | a17afa931d1aa73b8657cf26de3b49841837f66d (patch) | |
tree | 8b3e3408eea4fa15320f5c294d96b8e134bf49c4 /pkg/bindings/test/system_test.go | |
parent | 033336606f8aa9687cbdff5450c691b48d45e8e6 (diff) | |
parent | 86335aa4ae01dadecd36468409d742e68b76925d (diff) | |
download | podman-a17afa931d1aa73b8657cf26de3b49841837f66d.tar.gz podman-a17afa931d1aa73b8657cf26de3b49841837f66d.tar.bz2 podman-a17afa931d1aa73b8657cf26de3b49841837f66d.zip |
Merge pull request #8752 from baude/bindings3volumes
misc bindings to podman v3
Diffstat (limited to 'pkg/bindings/test/system_test.go')
-rw-r--r-- | pkg/bindings/test/system_test.go | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/pkg/bindings/test/system_test.go b/pkg/bindings/test/system_test.go index 82e5c7541..8a8c94d09 100644 --- a/pkg/bindings/test/system_test.go +++ b/pkg/bindings/test/system_test.go @@ -56,8 +56,8 @@ var _ = Describe("Podman system", func() { eventCounter++ } }() - - err = system.Events(bt.conn, binChan, nil, nil, nil, filters, bindings.PFalse) + options := new(system.EventsOptions).WithFilters(filters).WithStream(false) + err = system.Events(bt.conn, binChan, nil, options) Expect(err).To(BeNil()) done.Lock() Expect(eventCounter).To(BeNumerically(">", 0)) @@ -76,7 +76,8 @@ var _ = Describe("Podman system", func() { err = containers.Stop(bt.conn, name, nil) Expect(err).To(BeNil()) - systemPruneResponse, err := system.Prune(bt.conn, bindings.PTrue, bindings.PFalse) + options := new(system.PruneOptions).WithAll(true) + systemPruneResponse, err := system.Prune(bt.conn, options) Expect(err).To(BeNil()) Expect(len(systemPruneResponse.PodPruneReport)).To(Equal(1)) Expect(len(systemPruneResponse.ContainerPruneReport.ID)).To(Equal(1)) @@ -107,10 +108,10 @@ var _ = Describe("Podman system", func() { Expect(err).To(BeNil()) // Adding an unused volume - _, err = volumes.Create(bt.conn, entities.VolumeCreateOptions{}) + _, err = volumes.Create(bt.conn, entities.VolumeCreateOptions{}, nil) Expect(err).To(BeNil()) - - systemPruneResponse, err := system.Prune(bt.conn, bindings.PTrue, bindings.PFalse) + options := new(system.PruneOptions).WithAll(true) + systemPruneResponse, err := system.Prune(bt.conn, options) Expect(err).To(BeNil()) Expect(len(systemPruneResponse.PodPruneReport)).To(Equal(1)) Expect(len(systemPruneResponse.ContainerPruneReport.ID)).To(Equal(1)) @@ -141,10 +142,11 @@ var _ = Describe("Podman system", func() { Expect(err).To(BeNil()) // Adding an unused volume should work - _, err = volumes.Create(bt.conn, entities.VolumeCreateOptions{}) + _, err = volumes.Create(bt.conn, entities.VolumeCreateOptions{}, nil) Expect(err).To(BeNil()) - systemPruneResponse, err := system.Prune(bt.conn, bindings.PTrue, bindings.PTrue) + options := new(system.PruneOptions).WithAll(true).WithVolumes(true) + systemPruneResponse, err := system.Prune(bt.conn, options) Expect(err).To(BeNil()) Expect(len(systemPruneResponse.PodPruneReport)).To(Equal(0)) Expect(len(systemPruneResponse.ContainerPruneReport.ID)).To(Equal(1)) |