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:
Lajos Papp 2025-02-17 07:38:29 +00:00
parent f488a75d6d
commit e868f0f580

View File

@ -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) {