mirror of
https://github.com/containers/podman.git
synced 2025-05-25 02:57:21 +08:00

This represents the stage3 implementation for the image library. At this point, we are moving the image-centric functions to pkg/image including migration of args and object-oriented references. This is a not a one-for-one migration of funcs and some funcs will need to continue to reside in runtime_img as they are overly specific to libpod and probably not useful to others. Signed-off-by: baude <bbaude@redhat.com> Closes: #484 Approved by: baude
20 lines
420 B
Go
20 lines
420 B
Go
package util
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
var (
|
|
sliceData = []string{"one", "two", "three", "four"}
|
|
)
|
|
|
|
func TestStringInSlice(t *testing.T) {
|
|
// string is in the slice
|
|
assert.True(t, StringInSlice("one", sliceData))
|
|
// string is not in the slice
|
|
assert.False(t, StringInSlice("five", sliceData))
|
|
// string is not in empty slice
|
|
assert.False(t, StringInSlice("one", []string{}))
|
|
}
|