summaryrefslogtreecommitdiff
path: root/test/e2e/pull_test.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-04-27 14:28:38 +0200
committerMatthew Heon <matthew.heon@pm.me>2022-05-03 13:44:33 -0400
commitfb14171cba46f331fd9b25efed36c25b6b7ebcea (patch)
treecac289dfbc9cc6869915f22932e528ecb8fb71bc /test/e2e/pull_test.go
parent7249651329c380f21a9e5f7bef870950b6086eab (diff)
downloadpodman-fb14171cba46f331fd9b25efed36c25b6b7ebcea.tar.gz
podman-fb14171cba46f331fd9b25efed36c25b6b7ebcea.tar.bz2
podman-fb14171cba46f331fd9b25efed36c25b6b7ebcea.zip
enable errcheck linter
The errcheck linter makes sure that errors are always check and not ignored by accident. It spotted a lot of unchecked errors, mostly in the tests but also some real problem in the code. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/e2e/pull_test.go')
-rw-r--r--test/e2e/pull_test.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go
index d13334651..41eb8b449 100644
--- a/test/e2e/pull_test.go
+++ b/test/e2e/pull_test.go
@@ -345,7 +345,8 @@ var _ = Describe("Podman pull", func() {
podmanTest.AddImageToRWStore(cirros)
dirpath := filepath.Join(podmanTest.TempDir, "cirros")
- os.MkdirAll(dirpath, os.ModePerm)
+ err = os.MkdirAll(dirpath, os.ModePerm)
+ Expect(err).ToNot(HaveOccurred())
imgPath := fmt.Sprintf("dir:%s", dirpath)
session := podmanTest.Podman([]string{"push", "cirros", imgPath})
@@ -368,7 +369,8 @@ var _ = Describe("Podman pull", func() {
podmanTest.AddImageToRWStore(cirros)
dirpath := filepath.Join(podmanTest.TempDir, "cirros")
- os.MkdirAll(dirpath, os.ModePerm)
+ err = os.MkdirAll(dirpath, os.ModePerm)
+ Expect(err).ToNot(HaveOccurred())
imgPath := fmt.Sprintf("oci:%s", dirpath)
session := podmanTest.Podman([]string{"push", "cirros", imgPath})
@@ -387,7 +389,8 @@ var _ = Describe("Podman pull", func() {
})
It("podman pull check quiet", func() {
- podmanTest.RestoreArtifact(ALPINE)
+ err := podmanTest.RestoreArtifact(ALPINE)
+ Expect(err).ToNot(HaveOccurred())
setup := podmanTest.Podman([]string{"images", ALPINE, "-q", "--no-trunc"})
setup.WaitWithDefaultTimeout()
Expect(setup).Should(Exit(0))
@@ -428,8 +431,10 @@ var _ = Describe("Podman pull", func() {
// We already tested pulling, so we can save some energy and
// just restore local artifacts and tag them.
- podmanTest.RestoreArtifact(ALPINE)
- podmanTest.RestoreArtifact(BB)
+ err := podmanTest.RestoreArtifact(ALPINE)
+ Expect(err).ToNot(HaveOccurred())
+ err = podmanTest.RestoreArtifact(BB)
+ Expect(err).ToNot(HaveOccurred())
// What we want is at least two images which have the same name
// and are prefixed with two different unqualified-search