Skip to content

Commit

Permalink
Fix TestTaskRunStatus test to run on s390x
Browse files Browse the repository at this point in the history
TestTaskRunStatus test fails for s390x architecture because busybox
image in the code is specified with concrete SHA. SHA is unique for
each image and as a result for s390x case the amd64 image with the SHA
is pulled. Test failed.

Adding s390x specific SHA to s390x build solves this problem.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
  • Loading branch information
barthy1 committed Aug 5, 2020
1 parent 38455ba commit d6ad7d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/taskrun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ limitations under the License.
package test

import (
"runtime"
"strings"
"testing"

Expand Down Expand Up @@ -126,13 +127,17 @@ func TestTaskRunStatus(t *testing.T) {
taskRunName := "status-taskrun"

fqImageName := "busybox@sha256:895ab622e92e18d6b461d671081757af7dbaa3b00e3e28e12505af7817f73649"
if runtime.GOARCH == "s390x" {
fqImageName = "busybox@sha256:4f47c01fa91355af2865ac10fef5bf6ec9c7f42ad2321377c21e844427972977"
}

t.Logf("Creating Task and TaskRun in namespace %s", namespace)
task := &v1beta1.Task{
ObjectMeta: metav1.ObjectMeta{Name: "status-task", Namespace: namespace},
Spec: v1beta1.TaskSpec{
// This was the digest of the latest tag as of 8/12/2019
Steps: []v1beta1.Step{{Container: corev1.Container{
Image: "busybox@sha256:895ab622e92e18d6b461d671081757af7dbaa3b00e3e28e12505af7817f73649",
Image: fqImageName,
Command: []string{"/bin/sh"},
Args: []string{"-c", "echo hello"},
}}},
Expand Down

0 comments on commit d6ad7d1

Please sign in to comment.