diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2019-09-25 16:25:10 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2019-09-26 18:19:07 -0400 |
commit | 65b20bd521302020ff229d455c60102e15a41b8a (patch) | |
tree | c378d118a2661cb619715a425b8deec3e4f4c993 /test | |
parent | 851e3775d5d2e605bcb612054a94ac6de005f834 (diff) | |
download | podman-65b20bd521302020ff229d455c60102e15a41b8a.tar.gz podman-65b20bd521302020ff229d455c60102e15a41b8a.tar.bz2 podman-65b20bd521302020ff229d455c60102e15a41b8a.zip |
Correct use of reexec.Init()
A true result from reexec.Init() isn't an error, but it indicates that
main() should exit with a success exit status.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/common_test.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index 4e9881d59..1c2acf8ed 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -78,11 +78,15 @@ func (a testResultsSorted) Less(i, j int) bool { return a[i].length < a[j].lengt var testResults []testResult -// TestLibpod ginkgo master function -func TestLibpod(t *testing.T) { +func TestMain(m *testing.M) { if reexec.Init() { - os.Exit(1) + return } + os.Exit(m.Run()) +} + +// TestLibpod ginkgo master function +func TestLibpod(t *testing.T) { if os.Getenv("NOCACHE") == "1" { CACHE_IMAGES = []string{} RESTORE_IMAGES = []string{} |