Skip to content

Commit 8ea597b

Browse files
authored
CLOUDP-125772-add-gcp-pe-clean (#557)
1 parent fe01392 commit 8ea597b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/actions/cleanup/entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ delete_endpoints_for_project() {
2525
provider=$2
2626

2727
endpoints=$(mongocli atlas privateEndpoints "$provider" list --projectId "$projectID" -o json | jq -c . )
28-
[[ "$provider" == "aws" ]] && field=".interfaceEndpoints" || field=".privateEndpoints"
28+
[[ "$provider" == "aws" ]] && field=".interfaceEndpoints"
29+
[[ "$provider" == "azure" ]] && field=".privateEndpoints"
30+
[[ "$provider" == "gcp" ]] && field=".endpointGroupNames"
31+
[[ "$field" == "" ]] && echo "Please check provider" && exit 1
2932

3033
# shellcheck disable=SC2068
3134
# multiline
@@ -85,6 +88,7 @@ delete_old_project() {
8588
echo "====== Cleaning Project: $id"
8689
delete_endpoints_for_project "$id" "aws"
8790
delete_endpoints_for_project "$id" "azure"
91+
delete_endpoints_for_project "$id" "gcp"
8892
delete_project
8993
fi
9094
)
@@ -104,6 +108,7 @@ delete_all() {
104108
echo "====== Cleaning Project: $id"
105109
delete_endpoints_for_project "$id" "aws"
106110
delete_endpoints_for_project "$id" "azure"
111+
delete_endpoints_for_project "$id" "gcp"
107112
delete_clusters "$id"
108113
delete_project
109114
fi

test/e2e/private_link_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ func privateFlow(userData *model.TestDataProvider, requstedPE []privateEndpoint)
221221
By("Check if project statuses are updating, get project ID", func() {
222222
Eventually(kube.GetProjectPEndpointServiceStatus(userData), "15m", "10s").Should(Equal("True"),
223223
"Atlasproject status.conditions are not True")
224-
Eventually(kube.GetReadyProjectStatus(userData)).Should(Equal("True"),
224+
Eventually(kube.GetReadyProjectStatus(userData), "2m", "20s").Should(Equal("True"),
225225
"Atlasproject status.conditions are not True")
226226
Expect(AllPEndpointUpdated(userData)).Should(BeTrue(),
227227
"Error: Was created a different amount of endpoints")

0 commit comments

Comments
 (0)