From 0fcd805fa21ed16b35811b91ff1eb722662802fb Mon Sep 17 00:00:00 2001 From: Mahesh N Date: Sat, 8 Jun 2024 15:14:48 +0530 Subject: [PATCH 1/4] Check parallel testcase run --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9c728d73..f8aa019d 100644 --- a/Makefile +++ b/Makefile @@ -81,9 +81,9 @@ coverage: vendor ACC_TEST_FILE_LOCATION=github.com/HewlettPackard/hpegl-vmaas-terraform-resources/internal/acceptance_test acceptance: @if [ "${case}" != "" ]; then \ - TF_ACC=true go test -run $(case) -v -timeout=20000s -cover $(ACC_TEST_FILE_LOCATION); \ + TF_ACC=true go test -parallel 4 -run $(case) -v -timeout=20000s -cover $(ACC_TEST_FILE_LOCATION); \ else \ - TF_ACC=true go test -v -timeout=50000s -cover $(ACC_TEST_FILE_LOCATION) -parallel 1;\ + TF_ACC=true go test -parallel 4 -v -timeout=50000s -cover $(ACC_TEST_FILE_LOCATION);\ fi build: vendor $(NAME) From 42efa4a3a4b5f14500099d7e862d78c56455c5bc Mon Sep 17 00:00:00 2001 From: Mahesh N Date: Sun, 9 Jun 2024 14:20:30 +0530 Subject: [PATCH 2/4] single case fix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f8aa019d..1a4bc17a 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ coverage: vendor ACC_TEST_FILE_LOCATION=github.com/HewlettPackard/hpegl-vmaas-terraform-resources/internal/acceptance_test acceptance: @if [ "${case}" != "" ]; then \ - TF_ACC=true go test -parallel 4 -run $(case) -v -timeout=20000s -cover $(ACC_TEST_FILE_LOCATION); \ + TF_ACC=true go test -parallel 1 -run $(case) -v -timeout=20000s -cover $(ACC_TEST_FILE_LOCATION); \ else \ TF_ACC=true go test -parallel 4 -v -timeout=50000s -cover $(ACC_TEST_FILE_LOCATION);\ fi From ffce3cfd55a19f95fce85e05e289af80e428ba92 Mon Sep 17 00:00:00 2001 From: Mahesh N Date: Sun, 9 Jun 2024 14:26:19 +0530 Subject: [PATCH 3/4] make ci gating job as parallel --- .github/workflows/cicd-dev-acc.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd-dev-acc.yml b/.github/workflows/cicd-dev-acc.yml index 769fa775..f65bcce7 100644 --- a/.github/workflows/cicd-dev-acc.yml +++ b/.github/workflows/cicd-dev-acc.yml @@ -23,7 +23,8 @@ jobs: test-vmaas-instance: uses: ./.github/workflows/reusable-dev-acc.yml - needs: [test-datasouces] + # needs: [test-datasouces] + needs: [test-provider] if: "always()" with: test_case: TestVmaasInstance TestAccResourceInstance @@ -32,7 +33,8 @@ jobs: test-vmaas-lb: uses: ./.github/workflows/reusable-dev-acc.yml - needs: [test-vmaas-instance] + # needs: [test-vmaas-instance] + needs: [test-provider] if: "always()" with: test_case: TestVmaasLB TestAccResourceLB TestVmaasLoadBalancerPlan TestAccResourceLoadBalancerCreate @@ -41,7 +43,8 @@ jobs: test-vmaas-network: uses: ./.github/workflows/reusable-dev-acc.yml - needs: [test-vmaas-lb] + # needs: [test-vmaas-lb] + needs: [test-provider] if: "always()" with: test_case: TestVmaasNetworkPlan TestAccResourceNetworkCreate TestAccResourceRouter TestVmaasRouter TestAccResourceTier TestVmaasRouteBGPNeighborPlan From dff0d06537305bca5c2eac20d768b337e4196220 Mon Sep 17 00:00:00 2001 From: Mahesh N Date: Mon, 10 Jun 2024 09:54:13 +0530 Subject: [PATCH 4/4] fix workflow --- .github/workflows/cicd-dev-acc.yml | 9 ++++----- Makefile | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cicd-dev-acc.yml b/.github/workflows/cicd-dev-acc.yml index f65bcce7..66ebf372 100644 --- a/.github/workflows/cicd-dev-acc.yml +++ b/.github/workflows/cicd-dev-acc.yml @@ -25,7 +25,7 @@ jobs: uses: ./.github/workflows/reusable-dev-acc.yml # needs: [test-datasouces] needs: [test-provider] - if: "always()" + # if: "always()" with: test_case: TestVmaasInstance TestAccResourceInstance test_description: Instance usecase validations @@ -35,7 +35,7 @@ jobs: uses: ./.github/workflows/reusable-dev-acc.yml # needs: [test-vmaas-instance] needs: [test-provider] - if: "always()" + # if: "always()" with: test_case: TestVmaasLB TestAccResourceLB TestVmaasLoadBalancerPlan TestAccResourceLoadBalancerCreate test_description: Loadbalancer usecase validations @@ -45,7 +45,7 @@ jobs: uses: ./.github/workflows/reusable-dev-acc.yml # needs: [test-vmaas-lb] needs: [test-provider] - if: "always()" + # if: "always()" with: test_case: TestVmaasNetworkPlan TestAccResourceNetworkCreate TestAccResourceRouter TestVmaasRouter TestAccResourceTier TestVmaasRouteBGPNeighborPlan test_description: NSX Network usecase validations @@ -53,8 +53,7 @@ jobs: process-logs: runs-on: ubuntu-20.04 - needs: - - test-vmaas-network + needs: [test-vmaas-network, test-vmaas-lb, test-vmaas-instance, test-datasouces] if: "always()" steps: - name: Checkout workspace diff --git a/Makefile b/Makefile index 1a4bc17a..8edba547 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ coverage: vendor ACC_TEST_FILE_LOCATION=github.com/HewlettPackard/hpegl-vmaas-terraform-resources/internal/acceptance_test acceptance: @if [ "${case}" != "" ]; then \ - TF_ACC=true go test -parallel 1 -run $(case) -v -timeout=20000s -cover $(ACC_TEST_FILE_LOCATION); \ + TF_ACC=true go test -parallel 2 -run $(case) -v -timeout=20000s -cover $(ACC_TEST_FILE_LOCATION); \ else \ TF_ACC=true go test -parallel 4 -v -timeout=50000s -cover $(ACC_TEST_FILE_LOCATION);\ fi