Skip to content

Commit

Permalink
Addressed PR Review - to be squashed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrunalpagnis authored and YashwantGohokar committed Jul 3, 2024
1 parent d742697 commit 1ebb25f
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 22 deletions.
68 changes: 48 additions & 20 deletions hack/run_e2e_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,54 @@ function set_image_pull_repo_and_delete_namespace_flag () {
}

function run_e2e_tests_existing_cluster() {
ginkgo -v -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \
test/e2e/cloud-provider-oci -- \
--cluster-kubeconfig=${CLUSTER_KUBECONFIG} \
--cloud-config=${CLOUD_CONFIG} \
--adlocation=${ADLOCATION} \
--delete-namespace=${DELETE_NAMESPACE} \
--image-pull-repo=${IMAGE_PULL_REPO} \
--cmek-kms-key=${CMEK_KMS_KEY} \
--mnt-target-id=${MNT_TARGET_ID} \
--mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \
--mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \
--nsg-ocids=${NSG_OCIDS} \
--backend-nsg-ocids=${BACKEND_NSG_OCIDS} \
--reserved-ip=${RESERVED_IP} \
--architecture=${ARCHITECTURE} \
--volume-handle=${FSS_VOLUME_HANDLE} \
--static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \
--enable-parallel-run=${ENABLE_PARALLEL_RUN} \
--run-uhp-e2e=${RUN_UHP_E2E} \
--add-oke-system-tags="false"
if [[ -z "${E2E_NODE_COUNT}" ]]; then
E2E_NODE_COUNT=1
fi

if [ "$ENABLE_PARALLEL_RUN" == "true" ] || [ "$ENABLE_PARALLEL_RUN" == "TRUE" ]; then
ginkgo -v -p -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \
test/e2e/cloud-provider-oci -- \
--cluster-kubeconfig=${CLUSTER_KUBECONFIG} \
--cloud-config=${CLOUD_CONFIG} \
--adlocation=${ADLOCATION} \
--delete-namespace=${DELETE_NAMESPACE} \
--image-pull-repo=${IMAGE_PULL_REPO} \
--cmek-kms-key=${CMEK_KMS_KEY} \
--mnt-target-id=${MNT_TARGET_ID} \
--mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \
--mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \
--nsg-ocids=${NSG_OCIDS} \
--backend-nsg-ocids=${BACKEND_NSG_OCIDS} \
--reserved-ip=${RESERVED_IP} \
--architecture=${ARCHITECTURE} \
--volume-handle=${FSS_VOLUME_HANDLE} \
--static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \
--enable-parallel-run=${ENABLE_PARALLEL_RUN} \
--run-uhp-e2e=${RUN_UHP_E2E} \
--add-oke-system-tags="false"
else
ginkgo -v -progress --trace -nodes=${E2E_NODE_COUNT} "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \
ginkgo -v -p -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \
test/e2e/cloud-provider-oci -- \
--cluster-kubeconfig=${CLUSTER_KUBECONFIG} \
--cloud-config=${CLOUD_CONFIG} \
--adlocation=${ADLOCATION} \
--delete-namespace=${DELETE_NAMESPACE} \
--image-pull-repo=${IMAGE_PULL_REPO} \
--cmek-kms-key=${CMEK_KMS_KEY} \
--mnt-target-id=${MNT_TARGET_ID} \
--mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \
--mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \
--nsg-ocids=${NSG_OCIDS} \
--backend-nsg-ocids=${BACKEND_NSG_OCIDS} \
--reserved-ip=${RESERVED_IP} \
--architecture=${ARCHITECTURE} \
--volume-handle=${FSS_VOLUME_HANDLE} \
--static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \
--enable-parallel-run=${ENABLE_PARALLEL_RUN} \
--run-uhp-e2e=${RUN_UHP_E2E} \
--add-oke-system-tags="false"
fi
retval=$?
return $retval
}
Expand Down
1 change: 1 addition & 0 deletions pkg/cloudprovider/providers/oci/load_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str
dimensionsMap[metrics.ComponentDimension] = lbMetricDimension
dimensionsMap[metrics.ResourceOCIDDimension] = lbName
metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), time.Since(startTime).Seconds(), dimensionsMap)
return nil, err
}
lbExists := !client.IsNotFound(err)
lbOCID := ""
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/cloud-provider-oci/load_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var _ = Describe("Service [Slow]", func() {
},
},
}
Context("[cloudprovider][ccm][lb][SL][system-tags][test]", func() {
Context("[cloudprovider][ccm][lb][SL][system-tags]", func() {
It("should be possible to create and mutate a Service type:LoadBalancer (change nodeport) [Canary]", func() {
for _, test := range basicTestArray {
By("Running test for: " + test.lbType)
Expand Down Expand Up @@ -249,7 +249,7 @@ var _ = Describe("Service NSG [Slow]", func() {
},
},
}
Context("[cloudprovider][ccm][lb][managedNsg][test2]", func() {
Context("[cloudprovider][ccm][lb][managedNsg]", func() {
It("should be possible to create and mutate a Service type:LoadBalancer (change nodeport) [Canary]", func() {
for _, test := range basicTestArray {

Expand Down

0 comments on commit 1ebb25f

Please sign in to comment.