mirror of
https://github.com/containers/podman.git
synced 2025-06-17 06:57:43 +08:00
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>
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
"github.com/containers/libpod/libpod/events"
|
||||
"github.com/containers/libpod/pkg/util"
|
||||
"github.com/containers/storage"
|
||||
"github.com/containers/storage/pkg/reexec"
|
||||
"github.com/opencontainers/go-digest"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
@ -70,6 +71,13 @@ func makeLocalMatrix(b, bg *Image) ([]localImageTest, error) {
|
||||
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
if reexec.Init() {
|
||||
return
|
||||
}
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
// TestImage_NewFromLocal tests finding the image locally by various names,
|
||||
// tags, and aliases
|
||||
func TestImage_NewFromLocal(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user