Fixing additional tests

Fixing some of the existing failing tests in the CI process.

Specifically:

- gcp_appengine_firewall_rule: modified validation to support the
  default firewall rule
- gcp_cloudfunctions_cloud_function: bootstrapping the required GS
  bucket and files for creating a valid cloud function.
  - Slight update to the functionality, which now requires a runtime
    specified for new functions.
-
This commit is contained in:
Yusuke Tsutsumi 2022-10-08 17:36:39 +00:00
commit 0387ad3c17
10 changed files with 203 additions and 134 deletions

View file

@ -11,6 +11,7 @@ SERVICE_ACCOUNT_NAME="${2}"
SERVICE_LIST=(
"appengine"
"bigtable"
"cloudbuild.googleapis.com"
"cloudfunctions"
"cloudkms.googleapis.com"
"cloudresourcemanager.googleapis.com"
@ -50,11 +51,16 @@ if ! gcloud app describe --project="$PROJECT_ID" > /dev/null; then
gcloud app create --project="$PROJECT_ID" --region=us-central
fi
# create and upload cloud function for testing
BUCKET_NAME="gs://${PROJECT_ID}-ansible-testing"
# Add bindings
if ! gcloud storage buckets describe "${BUCKET_NAME}" > /dev/null; then
gcloud storage buckets create "gs://${PROJECT_ID}-ansible-testing" --project="${PROJECT_ID}"
fi
gsutil cp ./test-fixtures/cloud-function.zip "gs://${PROJECT_ID}-ansible-testing"
# roles/storage.objectAdmin
# The following is hard to automate, so echo
echo "Done! It may take up to 10 minutes for some of the changes to fully propagate."