Skip to content

Commit e4736fb

Browse files
mrunalpagnisYashwantGohokar
authored andcommitted
Addressed PR Review - to be squashed
1 parent 6f57102 commit e4736fb

File tree

3 files changed

+51
-22
lines changed

3 files changed

+51
-22
lines changed

hack/run_e2e_test.sh

Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,54 @@ function set_image_pull_repo_and_delete_namespace_flag () {
4343
}
4444

4545
function run_e2e_tests_existing_cluster() {
46-
ginkgo -v -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \
47-
test/e2e/cloud-provider-oci -- \
48-
--cluster-kubeconfig=${CLUSTER_KUBECONFIG} \
49-
--cloud-config=${CLOUD_CONFIG} \
50-
--adlocation=${ADLOCATION} \
51-
--delete-namespace=${DELETE_NAMESPACE} \
52-
--image-pull-repo=${IMAGE_PULL_REPO} \
53-
--cmek-kms-key=${CMEK_KMS_KEY} \
54-
--mnt-target-id=${MNT_TARGET_ID} \
55-
--mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \
56-
--mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \
57-
--nsg-ocids=${NSG_OCIDS} \
58-
--backend-nsg-ocids=${BACKEND_NSG_OCIDS} \
59-
--reserved-ip=${RESERVED_IP} \
60-
--architecture=${ARCHITECTURE} \
61-
--volume-handle=${FSS_VOLUME_HANDLE} \
62-
--static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \
63-
--enable-parallel-run=${ENABLE_PARALLEL_RUN} \
64-
--run-uhp-e2e=${RUN_UHP_E2E} \
65-
--add-oke-system-tags="false"
46+
if [[ -z "${E2E_NODE_COUNT}" ]]; then
47+
E2E_NODE_COUNT=1
48+
fi
49+
50+
if [ "$ENABLE_PARALLEL_RUN" == "true" ] || [ "$ENABLE_PARALLEL_RUN" == "TRUE" ]; then
51+
ginkgo -v -p -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \
52+
test/e2e/cloud-provider-oci -- \
53+
--cluster-kubeconfig=${CLUSTER_KUBECONFIG} \
54+
--cloud-config=${CLOUD_CONFIG} \
55+
--adlocation=${ADLOCATION} \
56+
--delete-namespace=${DELETE_NAMESPACE} \
57+
--image-pull-repo=${IMAGE_PULL_REPO} \
58+
--cmek-kms-key=${CMEK_KMS_KEY} \
59+
--mnt-target-id=${MNT_TARGET_ID} \
60+
--mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \
61+
--mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \
62+
--nsg-ocids=${NSG_OCIDS} \
63+
--backend-nsg-ocids=${BACKEND_NSG_OCIDS} \
64+
--reserved-ip=${RESERVED_IP} \
65+
--architecture=${ARCHITECTURE} \
66+
--volume-handle=${FSS_VOLUME_HANDLE} \
67+
--static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \
68+
--enable-parallel-run=${ENABLE_PARALLEL_RUN} \
69+
--run-uhp-e2e=${RUN_UHP_E2E} \
70+
--add-oke-system-tags="false"
71+
else
72+
ginkgo -v -progress --trace -nodes=${E2E_NODE_COUNT} "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \
73+
ginkgo -v -p -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \
74+
test/e2e/cloud-provider-oci -- \
75+
--cluster-kubeconfig=${CLUSTER_KUBECONFIG} \
76+
--cloud-config=${CLOUD_CONFIG} \
77+
--adlocation=${ADLOCATION} \
78+
--delete-namespace=${DELETE_NAMESPACE} \
79+
--image-pull-repo=${IMAGE_PULL_REPO} \
80+
--cmek-kms-key=${CMEK_KMS_KEY} \
81+
--mnt-target-id=${MNT_TARGET_ID} \
82+
--mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \
83+
--mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \
84+
--nsg-ocids=${NSG_OCIDS} \
85+
--backend-nsg-ocids=${BACKEND_NSG_OCIDS} \
86+
--reserved-ip=${RESERVED_IP} \
87+
--architecture=${ARCHITECTURE} \
88+
--volume-handle=${FSS_VOLUME_HANDLE} \
89+
--static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \
90+
--enable-parallel-run=${ENABLE_PARALLEL_RUN} \
91+
--run-uhp-e2e=${RUN_UHP_E2E} \
92+
--add-oke-system-tags="false"
93+
fi
6694
retval=$?
6795
return $retval
6896
}

pkg/cloudprovider/providers/oci/load_balancer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str
539539
dimensionsMap[metrics.ComponentDimension] = lbMetricDimension
540540
dimensionsMap[metrics.ResourceOCIDDimension] = lbName
541541
metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), time.Since(startTime).Seconds(), dimensionsMap)
542+
return nil, err
542543
}
543544
lbExists := !client.IsNotFound(err)
544545
lbOCID := ""

test/e2e/cloud-provider-oci/load_balancer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var _ = Describe("Service [Slow]", func() {
5656
},
5757
},
5858
}
59-
Context("[cloudprovider][ccm][lb][SL][system-tags][test]", func() {
59+
Context("[cloudprovider][ccm][lb][SL][system-tags]", func() {
6060
It("should be possible to create and mutate a Service type:LoadBalancer (change nodeport) [Canary]", func() {
6161
for _, test := range basicTestArray {
6262
By("Running test for: " + test.lbType)
@@ -249,7 +249,7 @@ var _ = Describe("Service NSG [Slow]", func() {
249249
},
250250
},
251251
}
252-
Context("[cloudprovider][ccm][lb][managedNsg][test2]", func() {
252+
Context("[cloudprovider][ccm][lb][managedNsg]", func() {
253253
It("should be possible to create and mutate a Service type:LoadBalancer (change nodeport) [Canary]", func() {
254254
for _, test := range basicTestArray {
255255

0 commit comments

Comments
 (0)