Skip to content

Commit

Permalink
fixes find test by ignoring image version (larstobi#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
mud5150 authored Jun 17, 2024
1 parent be6c09e commit a1e0b46
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion multipass/find_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ func TestFindByAlias(t *testing.T) {
Aliases: []string{},
}

if reflect.DeepEqual(*result, expected) {
imagesEqual := true

if result.Os != expected.Os {
imagesEqual = false
}
if result.Release != expected.Release {
imagesEqual = false
}
if reflect.DeepEqual(result.Aliases, expected.Aliases) && imagesEqual {
t.Logf("Success !")
} else {
fmt.Println("Expected:")
Expand Down

0 comments on commit a1e0b46

Please sign in to comment.