From 018d1b694580d6f7f93c81fd73aa6d7e0b1fd2aa Mon Sep 17 00:00:00 2001 From: GeunSam2 Date: Mon, 10 Apr 2023 19:12:05 +0000 Subject: [PATCH 01/10] fix: fix-test-error Signed-off-by: GeunSam2 --- test/e2e/hooks_test.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index 56ee4b32d2d4..8ecebc1e8baa 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -1,5 +1,5 @@ -//go:build functional -// +build functional +//go:build functional || local +// +build functional local package e2e @@ -189,6 +189,15 @@ spec: expression: steps["step-1"].status == "Failed" template: hook template: argosay + - - name: step-2 + hooks: + running: + expression: steps["step-2"].status == "Running" + template: hook + failed: + expression: steps["step-2"].status == "Failed" + template: hook + template: argosay - name: argosay container: image: argoproj/argosay:v2 From 1cf98345e6d567f4e9c9da0c6e9d28421b982453 Mon Sep 17 00:00:00 2001 From: GeunSam2 Date: Mon, 10 Apr 2023 19:44:44 +0000 Subject: [PATCH 02/10] fix: fix-test-error2 Signed-off-by: GeunSam2 --- test/e2e/hooks_test.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index 8ecebc1e8baa..56ee4b32d2d4 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -1,5 +1,5 @@ -//go:build functional || local -// +build functional local +//go:build functional +// +build functional package e2e @@ -189,15 +189,6 @@ spec: expression: steps["step-1"].status == "Failed" template: hook template: argosay - - - name: step-2 - hooks: - running: - expression: steps["step-2"].status == "Running" - template: hook - failed: - expression: steps["step-2"].status == "Failed" - template: hook - template: argosay - name: argosay container: image: argoproj/argosay:v2 From b40e698fcd72ed78436f7caa1ca2003da1463162 Mon Sep 17 00:00:00 2001 From: GeunSam2 Date: Thu, 13 Apr 2023 09:20:03 +0000 Subject: [PATCH 03/10] fix: add sleep for hooks test.#10897 Signed-off-by: GeunSam2 --- test/e2e/hooks_test.go | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index 56ee4b32d2d4..9c638f88f74a 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -45,7 +45,8 @@ spec: - name: argosay container: image: argoproj/argosay:v2 - command: ["/argosay"] + command: ["/bin/sh", "-c"] + args: ["/bin/sleep 5; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeSucceeded). @@ -88,12 +89,14 @@ spec: - name: argosay container: image: argoproj/argosay:v2 - command: ["/argosay", "sleep 5", "exit 1"] + command: ["/bin/sh", "-c"] + args: ["/bin/sleep 5; /argosay; exit 1"] - name: hook container: image: argoproj/argosay:v2 - command: ["/argosay"] + command: ["/bin/sh", "-c"] + args: ["/bin/sleep 5; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeFailed). @@ -143,7 +146,8 @@ spec: - name: argosay container: image: argoproj/argosay:v2 - command: ["/argosay"] + command: ["/bin/sh", "-c"] + args: ["/bin/sleep 5; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeSucceeded). @@ -192,11 +196,13 @@ spec: - name: argosay container: image: argoproj/argosay:v2 - command: ["/argosay", "sleep 5", "exit 1"] + command: ["/bin/sh", "-c"] + args: ["/bin/sleep 5; /argosay; exit 1"] - name: hook container: image: argoproj/argosay:v2 - command: ["/argosay"] + command: ["/bin/sh", "-c"] + args: ["/bin/sleep 5; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeFailed). @@ -248,7 +254,8 @@ spec: - name: argosay container: image: argoproj/argosay:v2 - command: ["/argosay"] + command: ["/bin/sh", "-c"] + args: ["/bin/sleep 5; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeSucceeded). @@ -298,11 +305,13 @@ spec: - name: argosay container: image: argoproj/argosay:v2 - command: ["/argosay", "sleep 5", "exit 1"] + command: ["/bin/sh", "-c"] + args: ["/bin/sleep 5; /argosay; exit 1"] - name: hook container: image: argoproj/argosay:v2 - command: ["/argosay"] + command: ["/bin/sh", "-c"] + args: ["/bin/sleep 5; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeFailed). From 5c07e115368cffc042e5d258d3c2470f0942f285 Mon Sep 17 00:00:00 2001 From: GeunSam2 Date: Thu, 13 Apr 2023 10:47:55 +0000 Subject: [PATCH 04/10] test: add one line for trigger ci test. Signed-off-by: GeunSam2 --- test/e2e/hooks_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index 9c638f88f74a..ffdd39d7615b 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -1,6 +1,7 @@ //go:build functional // +build functional + package e2e import ( From a646abc0b4a5eee4eb5c5a15d01ce4274a73b661 Mon Sep 17 00:00:00 2001 From: GeunSam2 Date: Thu, 13 Apr 2023 10:53:46 +0000 Subject: [PATCH 05/10] test: reduce sleep time 5 to 3. Signed-off-by: GeunSam2 --- test/e2e/hooks_test.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index ffdd39d7615b..7d524a4882fb 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -1,7 +1,6 @@ //go:build functional // +build functional - package e2e import ( @@ -47,7 +46,7 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 5; /argosay"] + args: ["/bin/sleep 3; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeSucceeded). @@ -91,13 +90,13 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 5; /argosay; exit 1"] + args: ["/bin/sleep 3; /argosay; exit 1"] - name: hook container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 5; /argosay"] + args: ["/bin/sleep 3; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeFailed). @@ -148,7 +147,7 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 5; /argosay"] + args: ["/bin/sleep 3; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeSucceeded). @@ -198,12 +197,12 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 5; /argosay; exit 1"] + args: ["/bin/sleep 3; /argosay; exit 1"] - name: hook container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 5; /argosay"] + args: ["/bin/sleep 3; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeFailed). @@ -256,7 +255,7 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 5; /argosay"] + args: ["/bin/sleep 3; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeSucceeded). @@ -307,12 +306,12 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 5; /argosay; exit 1"] + args: ["/bin/sleep 3; /argosay; exit 1"] - name: hook container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 5; /argosay"] + args: ["/bin/sleep 3; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeFailed). From b089dc8ec0949ad4031038baf80b33c27445869a Mon Sep 17 00:00:00 2001 From: GeunSam2 Date: Thu, 13 Apr 2023 10:58:33 +0000 Subject: [PATCH 06/10] test: reduce sleep time 3 to 1. Signed-off-by: GeunSam2 --- test/e2e/hooks_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index 7d524a4882fb..3e4480f837d2 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -46,7 +46,7 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 3; /argosay"] + args: ["/bin/sleep 1; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeSucceeded). @@ -90,13 +90,13 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 3; /argosay; exit 1"] + args: ["/bin/sleep 1; /argosay; exit 1"] - name: hook container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 3; /argosay"] + args: ["/bin/sleep 1; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeFailed). @@ -147,7 +147,7 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 3; /argosay"] + args: ["/bin/sleep 1; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeSucceeded). @@ -197,12 +197,12 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 3; /argosay; exit 1"] + args: ["/bin/sleep 1; /argosay; exit 1"] - name: hook container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 3; /argosay"] + args: ["/bin/sleep 1; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeFailed). @@ -255,7 +255,7 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 3; /argosay"] + args: ["/bin/sleep 1; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeSucceeded). @@ -306,12 +306,12 @@ spec: container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 3; /argosay; exit 1"] + args: ["/bin/sleep 1; /argosay; exit 1"] - name: hook container: image: argoproj/argosay:v2 command: ["/bin/sh", "-c"] - args: ["/bin/sleep 3; /argosay"] + args: ["/bin/sleep 1; /argosay"] `).When(). SubmitWorkflow(). WaitForWorkflow(fixtures.ToBeFailed). From 02268c9d11cd075a2465a580087fc845eae2b8de Mon Sep 17 00:00:00 2001 From: GeunSam2 Date: Thu, 13 Apr 2023 11:23:50 +0000 Subject: [PATCH 07/10] test: add one line for trigger ci test. Signed-off-by: GeunSam2 --- test/e2e/hooks_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index 3e4480f837d2..ccc38db948b4 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -1,6 +1,7 @@ //go:build functional // +build functional + package e2e import ( From 34e1060f949f621b22b56dadacaf776c69ea8ae2 Mon Sep 17 00:00:00 2001 From: GeunSam2 Date: Thu, 13 Apr 2023 11:55:55 +0000 Subject: [PATCH 08/10] test: remove one line for trigger ci test. Signed-off-by: GeunSam2 --- test/e2e/hooks_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index ccc38db948b4..3e4480f837d2 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -1,7 +1,6 @@ //go:build functional // +build functional - package e2e import ( From 04aaa5ed9e177681900f14515f50bbecd5af7910 Mon Sep 17 00:00:00 2001 From: GeunSam2 Date: Thu, 13 Apr 2023 12:17:24 +0000 Subject: [PATCH 09/10] test: add one line for trigger ci test. Signed-off-by: GeunSam2 --- test/e2e/hooks_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index 3e4480f837d2..ccc38db948b4 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -1,6 +1,7 @@ //go:build functional // +build functional + package e2e import ( From 34fb4174610d9dcfa65f01c5bd7f0d61182a1754 Mon Sep 17 00:00:00 2001 From: GeunSam2 Date: Thu, 13 Apr 2023 12:56:35 +0000 Subject: [PATCH 10/10] test: remove one line for trigger ci test. Signed-off-by: GeunSam2 --- test/e2e/hooks_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/test/e2e/hooks_test.go b/test/e2e/hooks_test.go index ccc38db948b4..3e4480f837d2 100644 --- a/test/e2e/hooks_test.go +++ b/test/e2e/hooks_test.go @@ -1,7 +1,6 @@ //go:build functional // +build functional - package e2e import (