Skip to content

Commit

Permalink
Fix image pull test for arm64 hosts (#158)
Browse files Browse the repository at this point in the history
* Fix image pull test for arm64 hosts

Co-authored-by: Luiz Aoqui <[email protected]>
  • Loading branch information
towe75 and lgfa29 authored Mar 4, 2022
1 parent 1cf5dc1 commit a16c14e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1739,13 +1739,22 @@ func TestPodmanDriver_Pull(t *testing.T) {
t.Parallel()
}

testCases := []struct {
type imageTestCase struct {
Image string
TaskName string
}{
}

testCases := []imageTestCase{
{Image: "busybox:unstable", TaskName: "pull_tag"},
{Image: "busybox", TaskName: "pull_non_tag"},
{Image: "busybox@sha256:ce98b632acbcbdf8d6fdc50d5f91fea39c770cd5b3a2724f52551dde4d088e96", TaskName: "pull_digest"},
}
switch runtime.GOARCH {
case "arm64":
testCases = append(testCases, imageTestCase{Image: "busybox@sha256:5acba83a746c7608ed544dc1533b87c737a0b0fb730301639a0179f9344b1678", TaskName: "pull_digest"})
case "amd64":
testCases = append(testCases, imageTestCase{Image: "busybox@sha256:ce98b632acbcbdf8d6fdc50d5f91fea39c770cd5b3a2724f52551dde4d088e96", TaskName: "pull_digest"})
default:
t.Fatalf("Unexpected architecture %s", runtime.GOARCH)
}

for _, testCase := range testCases {
Expand Down

0 comments on commit a16c14e

Please sign in to comment.