aboutsummaryrefslogtreecommitdiff
path: root/test/e2e/libpod_suite_remote_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/libpod_suite_remote_test.go')
-rw-r--r--test/e2e/libpod_suite_remote_test.go23
1 files changed, 13 insertions, 10 deletions
diff --git a/test/e2e/libpod_suite_remote_test.go b/test/e2e/libpod_suite_remote_test.go
index 9ad2bf7b9..8357246a5 100644
--- a/test/e2e/libpod_suite_remote_test.go
+++ b/test/e2e/libpod_suite_remote_test.go
@@ -16,6 +16,7 @@ import (
"time"
"github.com/containers/podman/v4/pkg/rootless"
+ . "github.com/onsi/gomega"
)
func IsRemote() bool {
@@ -57,7 +58,8 @@ func (p *PodmanTestIntegration) setDefaultRegistriesConfigEnv() {
func (p *PodmanTestIntegration) setRegistriesConfigEnv(b []byte) {
outfile := filepath.Join(p.TempDir, "registries.conf")
os.Setenv("CONTAINERS_REGISTRIES_CONF", outfile)
- ioutil.WriteFile(outfile, b, 0644)
+ err := ioutil.WriteFile(outfile, b, 0644)
+ Expect(err).ToNot(HaveOccurred())
}
func resetRegistriesConfigEnv() {
@@ -71,7 +73,8 @@ func PodmanTestCreate(tempDir string) *PodmanTestIntegration {
func (p *PodmanTestIntegration) StartRemoteService() {
if os.Geteuid() == 0 {
- os.MkdirAll("/run/podman", 0755)
+ err := os.MkdirAll("/run/podman", 0755)
+ Expect(err).ToNot(HaveOccurred())
}
args := []string{}
@@ -88,7 +91,8 @@ func (p *PodmanTestIntegration) StartRemoteService() {
command.Stdout = os.Stdout
command.Stderr = os.Stderr
fmt.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " "))
- command.Start()
+ err := command.Start()
+ Expect(err).ToNot(HaveOccurred())
command.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
p.RemoteCommand = command
p.RemoteSession = command.Process
@@ -145,11 +149,6 @@ func getRemoteOptions(p *PodmanTestIntegration, args []string) []string {
return podmanOptions
}
-// SeedImages restores all the artifacts into the main store for remote tests
-func (p *PodmanTestIntegration) SeedImages() error {
- return nil
-}
-
// RestoreArtifact puts the cached image into our test store
func (p *PodmanTestIntegration) RestoreArtifact(image string) error {
tarball := imageTarPath(image)
@@ -159,8 +158,12 @@ func (p *PodmanTestIntegration) RestoreArtifact(image string) error {
podmanOptions := getRemoteOptions(p, args)
command := exec.Command(p.PodmanBinary, podmanOptions...)
fmt.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " "))
- command.Start()
- command.Wait()
+ if err := command.Start(); err != nil {
+ return err
+ }
+ if err := command.Wait(); err != nil {
+ return err
+ }
}
return nil
}