From 1a700d441b401fea1f73dc6e02d966b144161aaf Mon Sep 17 00:00:00 2001 From: Yulia Gaponenko Date: Mon, 26 Oct 2020 12:54:12 +0100 Subject: [PATCH] Use proper platform for ko in examples test ko has multi-arch support, so to run examples test with proper image build when `ko:` and `ko apply` is used it is necessary to specify platform parameter. getTestArch usage allows to use host architecture or rewrite the value with TEST_RUNTIME_ARCH. Signed-off-by: Yulia Gaponenko --- test/examples_test.go | 2 +- test/multiarch_utils.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/examples_test.go b/test/examples_test.go index 6cbc2b9a41c..41fbfbb457d 100644 --- a/test/examples_test.go +++ b/test/examples_test.go @@ -93,7 +93,7 @@ func substituteEnv(input []byte, namespace string) ([]byte, error) { // koCreate wraps the ko binary and invokes `ko create` for input within // namespace func koCreate(input []byte, namespace string) ([]byte, error) { - cmd := exec.Command("ko", "create", "-n", namespace, "-f", "-") + cmd := exec.Command("ko", "create", "--platform", "linux/"+getTestArch(), "-n", namespace, "-f", "-") cmd.Stdin = bytes.NewReader(input) return cmd.CombinedOutput() } diff --git a/test/multiarch_utils.go b/test/multiarch_utils.go index 48c7db4d559..f21bb7dc0ab 100644 --- a/test/multiarch_utils.go +++ b/test/multiarch_utils.go @@ -119,7 +119,6 @@ func initExcludedTests() sets.String { "TestExamples/v1alpha1/taskruns/gcs-resource", "TestExamples/v1beta1/taskruns/gcs-resource", "TestExamples/v1beta1/taskruns/authenticating-git-commands", - "TestExamples/v1beta1/pipelineruns/pipelinerun-with-final-tasks", "TestExamples/v1beta1/taskruns/workspace-in-sidecar", //e2e "TestHelmDeployPipelineRun",