From db04cff401c64b24e513d63483015f04a5c005c6 Mon Sep 17 00:00:00 2001 From: arout Date: Thu, 20 Aug 2020 12:15:20 +0530 Subject: [PATCH 1/6] Ginkgo parallel test node CI timeout debugging --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 52441cdb458..daedb8f92f1 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ GINKGO_FLAGS_ALL = $(GINKGO_TEST_ARGS) -randomizeAllSpecs -slowSpecThreshold=$(S # Flags for tests that must not be run in parallel. GINKGO_FLAGS_SERIAL = $(GINKGO_FLAGS_ALL) -nodes=1 # Flags for tests that may be run in parallel -GINKGO_FLAGS=$(GINKGO_FLAGS_ALL) -nodes=$(TEST_EXEC_NODES) +GINKGO_FLAGS=$(GINKGO_FLAGS_ALL) -debug -nodes=$(TEST_EXEC_NODES) default: bin From 7c62c5785cf32c47821ba7a56ff5619dbf87ce04 Mon Sep 17 00:00:00 2001 From: arout Date: Fri, 21 Aug 2020 02:51:19 +0530 Subject: [PATCH 2/6] time --- scripts/openshiftci-presubmit-all-tests.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/openshiftci-presubmit-all-tests.sh b/scripts/openshiftci-presubmit-all-tests.sh index c290ebbf3b5..48dc1ab4f45 100755 --- a/scripts/openshiftci-presubmit-all-tests.sh +++ b/scripts/openshiftci-presubmit-all-tests.sh @@ -58,13 +58,13 @@ elif [ "${ARCH}" == "ppc64le" ]; then make test-e2e-beta else # Integration tests - make test-integration - make test-integration-devfile - make test-cmd-login-logout - make test-cmd-project - make test-operator-hub + time make test-integration + time make test-integration-devfile + time make test-cmd-login-logout + time make test-cmd-project + time make test-operator-hub # E2e tests - make test-e2e-all + time make test-e2e-all fi odo logout From 2ddf0a60bf196a8e660b9aac71295d2f165c03db Mon Sep 17 00:00:00 2001 From: arout Date: Fri, 21 Aug 2020 10:26:13 +0530 Subject: [PATCH 3/6] Commenting out test for parent support --- .../devfile/cmd_devfile_push_test.go | 118 +++++++++--------- 1 file changed, 57 insertions(+), 61 deletions(-) diff --git a/tests/integration/devfile/cmd_devfile_push_test.go b/tests/integration/devfile/cmd_devfile_push_test.go index 5e4a1148cac..25414843731 100644 --- a/tests/integration/devfile/cmd_devfile_push_test.go +++ b/tests/integration/devfile/cmd_devfile_push_test.go @@ -2,15 +2,11 @@ package devfile import ( "fmt" - "net/http" "os" "path/filepath" - "strconv" "strings" "time" - "github.com/openshift/odo/pkg/util" - "github.com/openshift/odo/tests/helper" "github.com/openshift/odo/tests/integration/devfile/utils" @@ -760,79 +756,79 @@ var _ = Describe("odo devfile push command tests", func() { }) - Context("Handle devfiles with parent", func() { - var server *http.Server - var freePort int - var parentTmpFolder string + // Context("Handle devfiles with parent", func() { + // var server *http.Server + // var freePort int + // var parentTmpFolder string - var _ = BeforeSuite(func() { - // get a free port - var err error - freePort, err = util.HTTPGetFreePort() - Expect(err).NotTo(HaveOccurred()) + // var _ = BeforeSuite(func() { + // // get a free port + // var err error + // freePort, err = util.HTTPGetFreePort() + // Expect(err).NotTo(HaveOccurred()) - // move the parent devfiles to a tmp folder - parentTmpFolder = helper.CreateNewContext() - helper.CopyExample(filepath.Join("source", "devfiles", "parentSupport"), parentTmpFolder) - // update the port in the required devfile with the free port - helper.ReplaceString(filepath.Join(parentTmpFolder, "devfile-middle-layer.yaml"), "(-1)", strconv.Itoa(freePort)) + // // move the parent devfiles to a tmp folder + // parentTmpFolder = helper.CreateNewContext() + // helper.CopyExample(filepath.Join("source", "devfiles", "parentSupport"), parentTmpFolder) + // // update the port in the required devfile with the free port + // helper.ReplaceString(filepath.Join(parentTmpFolder, "devfile-middle-layer.yaml"), "(-1)", strconv.Itoa(freePort)) - // start the server and serve from the tmp folder of the devfiles - server = helper.HttpFileServer(freePort, parentTmpFolder) + // // start the server and serve from the tmp folder of the devfiles + // server = helper.HttpFileServer(freePort, parentTmpFolder) - // wait for the server to be respond with the desired result - helper.HttpWaitFor("http://localhost:"+strconv.Itoa(freePort), "devfile", 10, 1) - }) + // // wait for the server to be respond with the desired result + // helper.HttpWaitFor("http://localhost:"+strconv.Itoa(freePort), "devfile", 10, 1) + // }) - var _ = AfterSuite(func() { - helper.DeleteDir(parentTmpFolder) - err := server.Close() - Expect(err).To(BeNil()) - }) + // var _ = AfterSuite(func() { + // helper.DeleteDir(parentTmpFolder) + // err := server.Close() + // Expect(err).To(BeNil()) + // }) - It("should handle a devfile with a parent and add a extra command", func() { - utils.ExecPushToTestParent(context, cmpName, namespace) - podName := cliRunner.GetRunningPodNameByComponent(cmpName, namespace) - listDir := cliRunner.ExecListDir(podName, namespace, "/project/") - Expect(listDir).To(ContainSubstring("blah.js")) - }) + // It("should handle a devfile with a parent and add a extra command", func() { + // utils.ExecPushToTestParent(context, cmpName, namespace) + // podName := cliRunner.GetRunningPodNameByComponent(cmpName, namespace) + // listDir := cliRunner.ExecListDir(podName, namespace, "/project/") + // Expect(listDir).To(ContainSubstring("blah.js")) + // }) - It("should handle a parent and override/append it's envs", func() { - utils.ExecPushWithParentOverride(context, cmpName, namespace, freePort) + // It("should handle a parent and override/append it's envs", func() { + // utils.ExecPushWithParentOverride(context, cmpName, namespace, freePort) - envMap := cliRunner.GetEnvsDevFileDeployment(cmpName, namespace) + // envMap := cliRunner.GetEnvsDevFileDeployment(cmpName, namespace) - value, ok := envMap["ODO_TEST_ENV_0"] - Expect(ok).To(BeTrue()) - Expect(value).To(Equal("ENV_VALUE_0")) + // value, ok := envMap["ODO_TEST_ENV_0"] + // Expect(ok).To(BeTrue()) + // Expect(value).To(Equal("ENV_VALUE_0")) - value, ok = envMap["ODO_TEST_ENV_1"] - Expect(ok).To(BeTrue()) - Expect(value).To(Equal("ENV_VALUE_1_1")) - }) + // value, ok = envMap["ODO_TEST_ENV_1"] + // Expect(ok).To(BeTrue()) + // Expect(value).To(Equal("ENV_VALUE_1_1")) + // }) - It("should handle a multi layer parent", func() { - utils.ExecPushWithMultiLayerParent(context, cmpName, namespace, freePort) + // It("should handle a multi layer parent", func() { + // utils.ExecPushWithMultiLayerParent(context, cmpName, namespace, freePort) - podName := cliRunner.GetRunningPodNameByComponent(cmpName, namespace) - listDir := cliRunner.ExecListDir(podName, namespace, "/project") - helper.MatchAllInOutput(listDir, []string{"blah.js", "new-blah.js"}) + // podName := cliRunner.GetRunningPodNameByComponent(cmpName, namespace) + // listDir := cliRunner.ExecListDir(podName, namespace, "/project") + // helper.MatchAllInOutput(listDir, []string{"blah.js", "new-blah.js"}) - envMap := cliRunner.GetEnvsDevFileDeployment(cmpName, namespace) + // envMap := cliRunner.GetEnvsDevFileDeployment(cmpName, namespace) - value, ok := envMap["ODO_TEST_ENV_1"] - Expect(ok).To(BeTrue()) - Expect(value).To(Equal("ENV_VALUE_1_1")) + // value, ok := envMap["ODO_TEST_ENV_1"] + // Expect(ok).To(BeTrue()) + // Expect(value).To(Equal("ENV_VALUE_1_1")) - value, ok = envMap["ODO_TEST_ENV_2"] - Expect(ok).To(BeTrue()) - Expect(value).To(Equal("ENV_VALUE_2")) + // value, ok = envMap["ODO_TEST_ENV_2"] + // Expect(ok).To(BeTrue()) + // Expect(value).To(Equal("ENV_VALUE_2")) - value, ok = envMap["ODO_TEST_ENV_3"] - Expect(ok).To(BeTrue()) - Expect(value).To(Equal("ENV_VALUE_3")) + // value, ok = envMap["ODO_TEST_ENV_3"] + // Expect(ok).To(BeTrue()) + // Expect(value).To(Equal("ENV_VALUE_3")) - }) - }) + // }) + // }) }) From 6fcb6179d1ea7a864752cbf45567697138cc716e Mon Sep 17 00:00:00 2001 From: arout Date: Fri, 21 Aug 2020 11:13:03 +0530 Subject: [PATCH 4/6] Parent test looks good to me --- .../devfile/cmd_devfile_push_test.go | 118 +++++++++--------- 1 file changed, 61 insertions(+), 57 deletions(-) diff --git a/tests/integration/devfile/cmd_devfile_push_test.go b/tests/integration/devfile/cmd_devfile_push_test.go index 25414843731..5e4a1148cac 100644 --- a/tests/integration/devfile/cmd_devfile_push_test.go +++ b/tests/integration/devfile/cmd_devfile_push_test.go @@ -2,11 +2,15 @@ package devfile import ( "fmt" + "net/http" "os" "path/filepath" + "strconv" "strings" "time" + "github.com/openshift/odo/pkg/util" + "github.com/openshift/odo/tests/helper" "github.com/openshift/odo/tests/integration/devfile/utils" @@ -756,79 +760,79 @@ var _ = Describe("odo devfile push command tests", func() { }) - // Context("Handle devfiles with parent", func() { - // var server *http.Server - // var freePort int - // var parentTmpFolder string + Context("Handle devfiles with parent", func() { + var server *http.Server + var freePort int + var parentTmpFolder string - // var _ = BeforeSuite(func() { - // // get a free port - // var err error - // freePort, err = util.HTTPGetFreePort() - // Expect(err).NotTo(HaveOccurred()) + var _ = BeforeSuite(func() { + // get a free port + var err error + freePort, err = util.HTTPGetFreePort() + Expect(err).NotTo(HaveOccurred()) - // // move the parent devfiles to a tmp folder - // parentTmpFolder = helper.CreateNewContext() - // helper.CopyExample(filepath.Join("source", "devfiles", "parentSupport"), parentTmpFolder) - // // update the port in the required devfile with the free port - // helper.ReplaceString(filepath.Join(parentTmpFolder, "devfile-middle-layer.yaml"), "(-1)", strconv.Itoa(freePort)) + // move the parent devfiles to a tmp folder + parentTmpFolder = helper.CreateNewContext() + helper.CopyExample(filepath.Join("source", "devfiles", "parentSupport"), parentTmpFolder) + // update the port in the required devfile with the free port + helper.ReplaceString(filepath.Join(parentTmpFolder, "devfile-middle-layer.yaml"), "(-1)", strconv.Itoa(freePort)) - // // start the server and serve from the tmp folder of the devfiles - // server = helper.HttpFileServer(freePort, parentTmpFolder) + // start the server and serve from the tmp folder of the devfiles + server = helper.HttpFileServer(freePort, parentTmpFolder) - // // wait for the server to be respond with the desired result - // helper.HttpWaitFor("http://localhost:"+strconv.Itoa(freePort), "devfile", 10, 1) - // }) + // wait for the server to be respond with the desired result + helper.HttpWaitFor("http://localhost:"+strconv.Itoa(freePort), "devfile", 10, 1) + }) - // var _ = AfterSuite(func() { - // helper.DeleteDir(parentTmpFolder) - // err := server.Close() - // Expect(err).To(BeNil()) - // }) + var _ = AfterSuite(func() { + helper.DeleteDir(parentTmpFolder) + err := server.Close() + Expect(err).To(BeNil()) + }) - // It("should handle a devfile with a parent and add a extra command", func() { - // utils.ExecPushToTestParent(context, cmpName, namespace) - // podName := cliRunner.GetRunningPodNameByComponent(cmpName, namespace) - // listDir := cliRunner.ExecListDir(podName, namespace, "/project/") - // Expect(listDir).To(ContainSubstring("blah.js")) - // }) + It("should handle a devfile with a parent and add a extra command", func() { + utils.ExecPushToTestParent(context, cmpName, namespace) + podName := cliRunner.GetRunningPodNameByComponent(cmpName, namespace) + listDir := cliRunner.ExecListDir(podName, namespace, "/project/") + Expect(listDir).To(ContainSubstring("blah.js")) + }) - // It("should handle a parent and override/append it's envs", func() { - // utils.ExecPushWithParentOverride(context, cmpName, namespace, freePort) + It("should handle a parent and override/append it's envs", func() { + utils.ExecPushWithParentOverride(context, cmpName, namespace, freePort) - // envMap := cliRunner.GetEnvsDevFileDeployment(cmpName, namespace) + envMap := cliRunner.GetEnvsDevFileDeployment(cmpName, namespace) - // value, ok := envMap["ODO_TEST_ENV_0"] - // Expect(ok).To(BeTrue()) - // Expect(value).To(Equal("ENV_VALUE_0")) + value, ok := envMap["ODO_TEST_ENV_0"] + Expect(ok).To(BeTrue()) + Expect(value).To(Equal("ENV_VALUE_0")) - // value, ok = envMap["ODO_TEST_ENV_1"] - // Expect(ok).To(BeTrue()) - // Expect(value).To(Equal("ENV_VALUE_1_1")) - // }) + value, ok = envMap["ODO_TEST_ENV_1"] + Expect(ok).To(BeTrue()) + Expect(value).To(Equal("ENV_VALUE_1_1")) + }) - // It("should handle a multi layer parent", func() { - // utils.ExecPushWithMultiLayerParent(context, cmpName, namespace, freePort) + It("should handle a multi layer parent", func() { + utils.ExecPushWithMultiLayerParent(context, cmpName, namespace, freePort) - // podName := cliRunner.GetRunningPodNameByComponent(cmpName, namespace) - // listDir := cliRunner.ExecListDir(podName, namespace, "/project") - // helper.MatchAllInOutput(listDir, []string{"blah.js", "new-blah.js"}) + podName := cliRunner.GetRunningPodNameByComponent(cmpName, namespace) + listDir := cliRunner.ExecListDir(podName, namespace, "/project") + helper.MatchAllInOutput(listDir, []string{"blah.js", "new-blah.js"}) - // envMap := cliRunner.GetEnvsDevFileDeployment(cmpName, namespace) + envMap := cliRunner.GetEnvsDevFileDeployment(cmpName, namespace) - // value, ok := envMap["ODO_TEST_ENV_1"] - // Expect(ok).To(BeTrue()) - // Expect(value).To(Equal("ENV_VALUE_1_1")) + value, ok := envMap["ODO_TEST_ENV_1"] + Expect(ok).To(BeTrue()) + Expect(value).To(Equal("ENV_VALUE_1_1")) - // value, ok = envMap["ODO_TEST_ENV_2"] - // Expect(ok).To(BeTrue()) - // Expect(value).To(Equal("ENV_VALUE_2")) + value, ok = envMap["ODO_TEST_ENV_2"] + Expect(ok).To(BeTrue()) + Expect(value).To(Equal("ENV_VALUE_2")) - // value, ok = envMap["ODO_TEST_ENV_3"] - // Expect(ok).To(BeTrue()) - // Expect(value).To(Equal("ENV_VALUE_3")) + value, ok = envMap["ODO_TEST_ENV_3"] + Expect(ok).To(BeTrue()) + Expect(value).To(Equal("ENV_VALUE_3")) - // }) - // }) + }) + }) }) From 4a6ebfa2c86ecd54d2a14cccb9d9533cb1d69ef6 Mon Sep 17 00:00:00 2001 From: arout Date: Fri, 21 Aug 2020 11:50:55 +0530 Subject: [PATCH 5/6] Enable vorbose for devfile watch test --- scripts/openshiftci-presubmit-all-tests.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/openshiftci-presubmit-all-tests.sh b/scripts/openshiftci-presubmit-all-tests.sh index 48dc1ab4f45..b007df90cb0 100755 --- a/scripts/openshiftci-presubmit-all-tests.sh +++ b/scripts/openshiftci-presubmit-all-tests.sh @@ -58,13 +58,14 @@ elif [ "${ARCH}" == "ppc64le" ]; then make test-e2e-beta else # Integration tests - time make test-integration - time make test-integration-devfile - time make test-cmd-login-logout - time make test-cmd-project - time make test-operator-hub + # time make test-integration + # time GINKGO_TEST_ARGS=-v make test-integration-devfile + GINKGO_TEST_ARGS=-v make test-cmd-devfile-watch + #time make test-cmd-login-logout + #time make test-cmd-project + #time make test-operator-hub # E2e tests - time make test-e2e-all + #time make test-e2e-all fi odo logout From 2947f2c26db05db36e7999ac7f292780dd11a056 Mon Sep 17 00:00:00 2001 From: arout Date: Fri, 21 Aug 2020 13:31:33 +0530 Subject: [PATCH 6/6] Adding devfile log test --- scripts/openshiftci-presubmit-all-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/openshiftci-presubmit-all-tests.sh b/scripts/openshiftci-presubmit-all-tests.sh index b007df90cb0..ed697fdf58d 100755 --- a/scripts/openshiftci-presubmit-all-tests.sh +++ b/scripts/openshiftci-presubmit-all-tests.sh @@ -61,6 +61,7 @@ else # time make test-integration # time GINKGO_TEST_ARGS=-v make test-integration-devfile GINKGO_TEST_ARGS=-v make test-cmd-devfile-watch + GINKGO_TEST_ARGS=-v make test-cmd-devfile-log #time make test-cmd-login-logout #time make test-cmd-project #time make test-operator-hub