From 8f1494ac401cadcded93f50adee73e0310056819 Mon Sep 17 00:00:00 2001 From: Jared O'Connell Date: Thu, 12 Sep 2024 18:39:04 -0400 Subject: [PATCH 1/2] Skip tests that require pulling container images --- engine_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/engine_test.go b/engine_test.go index 9f167ac0..8a8180ff 100644 --- a/engine_test.go +++ b/engine_test.go @@ -148,6 +148,11 @@ output: []`), } func TestE2E(t *testing.T) { + if testing.Short() { + // This test requires pulling containers; it must not be used when count > 2 + t.Skip("skipping e2e test in short mode") + } + content := map[string][]byte{ "workflow.yaml": []byte(`version: v0.2.0 input: @@ -184,6 +189,11 @@ output: } func TestE2EMultipleOutputs(t *testing.T) { + if testing.Short() { + // This test requires pulling containers; it must not be used when count > 2 + t.Skip("skipping e2e test in short mode") + } + content := map[string][]byte{ "workflow.yaml": []byte(`version: v0.2.0 input: @@ -220,6 +230,11 @@ outputs: } func TestE2EWorkflowDefaultInput(t *testing.T) { + if testing.Short() { + // This test requires pulling containers; it must not be used when count > 2 + t.Skip("skipping e2e test in short mode") + } + content := map[string][]byte{ "workflow.yaml": []byte(`version: v0.2.0 input: @@ -262,6 +277,11 @@ outputs: // referenced in the main workflow is incorporated into the // workflow's execution. func Test_CacheSubworkflows(t *testing.T) { + if testing.Short() { + // This test requires pulling containers; it must not be used when count > 2 + t.Skip("skipping e2e test in short mode") + } + fileCache, err := loadfile.NewFileCacheUsingContext( "fixtures/test-subworkflow", map[string]string{ From 015882aab070e1475d5663cf8356026edc334c01 Mon Sep 17 00:00:00 2001 From: Jared O'Connell Date: Fri, 13 Sep 2024 10:47:58 -0400 Subject: [PATCH 2/2] Update skip message and remove comment --- engine_test.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/engine_test.go b/engine_test.go index 8a8180ff..363ac7f3 100644 --- a/engine_test.go +++ b/engine_test.go @@ -149,8 +149,7 @@ output: []`), func TestE2E(t *testing.T) { if testing.Short() { - // This test requires pulling containers; it must not be used when count > 2 - t.Skip("skipping e2e test in short mode") + t.Skip("skipping e2e test in short mode due to container pulling") } content := map[string][]byte{ @@ -190,8 +189,7 @@ output: func TestE2EMultipleOutputs(t *testing.T) { if testing.Short() { - // This test requires pulling containers; it must not be used when count > 2 - t.Skip("skipping e2e test in short mode") + t.Skip("skipping e2e test in short mode due to container pulling") } content := map[string][]byte{ @@ -231,8 +229,7 @@ outputs: func TestE2EWorkflowDefaultInput(t *testing.T) { if testing.Short() { - // This test requires pulling containers; it must not be used when count > 2 - t.Skip("skipping e2e test in short mode") + t.Skip("skipping e2e test in short mode due to container pulling") } content := map[string][]byte{ @@ -278,8 +275,7 @@ outputs: // workflow's execution. func Test_CacheSubworkflows(t *testing.T) { if testing.Short() { - // This test requires pulling containers; it must not be used when count > 2 - t.Skip("skipping e2e test in short mode") + t.Skip("skipping e2e test in short mode due to container pulling") } fileCache, err := loadfile.NewFileCacheUsingContext(