mirror of
https://github.com/containers/podman.git
synced 2025-05-20 16:47:39 +08:00
Abort a test on nil containers, so that future tests don't panic
Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1111 Approved by: baude
This commit is contained in:

committed by
Atomic Bot

parent
cedb4576a4
commit
c020db8cd2
@ -12,6 +12,7 @@ import (
|
||||
"github.com/cri-o/ocicni/pkg/ocicni"
|
||||
"github.com/opencontainers/runtime-tools/generate"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func getTestContainer(id, name, locksDir string) (*Container, error) {
|
||||
@ -148,8 +149,8 @@ func testContainersEqual(t *testing.T, a, b *Container) {
|
||||
if a == nil && b == nil {
|
||||
return
|
||||
}
|
||||
assert.NotNil(t, a)
|
||||
assert.NotNil(t, b)
|
||||
require.NotNil(t, a)
|
||||
require.NotNil(t, b)
|
||||
|
||||
assert.NotNil(t, a.config)
|
||||
assert.NotNil(t, b.config)
|
||||
|
Reference in New Issue
Block a user