cli/command/container/opts_test: Fix entrypoint parsing logic
Right now the test passes even if you change the expected value. It passes if the array has 1 element. Signed-off-by: Lajos Papp <lalyos@yahoo.com>
This commit is contained in:
parent
f488a75d6d
commit
e868f0f580
@ -1016,12 +1016,8 @@ func TestParseLabelfileVariables(t *testing.T) {
|
||||
|
||||
func TestParseEntryPoint(t *testing.T) {
|
||||
config, _, _, err := parseRun([]string{"--entrypoint=anything", "cmd", "img"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(config.Entrypoint) != 1 && config.Entrypoint[0] != "anything" {
|
||||
t.Fatalf("Expected entrypoint 'anything', got %v", config.Entrypoint)
|
||||
}
|
||||
assert.NilError(t, err)
|
||||
assert.Check(t, is.DeepEqual([]string(config.Entrypoint), []string{"anything"}))
|
||||
}
|
||||
|
||||
func TestValidateDevice(t *testing.T) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user