From c96abf727084ca95d73850d0771b4ba7b3582adb Mon Sep 17 00:00:00 2001 From: Andrea Gandolfi Date: Tue, 20 Jul 2021 10:28:00 +0200 Subject: [PATCH] Networking examples: Fix tests "private cloud function from onprem" --- networking/private-cloud-function-from-onprem/main.tf | 2 +- networking/private-cloud-function-from-onprem/outputs.tf | 4 ---- networking/private-cloud-function-from-onprem/variables.tf | 4 ---- .../private_cloud_function_from_onprem/test_plan.py | 2 +- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/networking/private-cloud-function-from-onprem/main.tf b/networking/private-cloud-function-from-onprem/main.tf index df7429525..9a2fbf883 100644 --- a/networking/private-cloud-function-from-onprem/main.tf +++ b/networking/private-cloud-function-from-onprem/main.tf @@ -235,7 +235,7 @@ module "function-hello" { bucket_name = var.cloud_function_gcs_bucket ingress_settings = "ALLOW_INTERNAL_ONLY" bundle_config = { - source_dir = "assets" + source_dir = "${path.module}/assets" output_path = "bundle.zip" } bucket_config = { diff --git a/networking/private-cloud-function-from-onprem/outputs.tf b/networking/private-cloud-function-from-onprem/outputs.tf index a452858a2..2c52e5809 100644 --- a/networking/private-cloud-function-from-onprem/outputs.tf +++ b/networking/private-cloud-function-from-onprem/outputs.tf @@ -14,10 +14,6 @@ * limitations under the License. */ -############################################################################### -# OUTPUTS # -############################################################################### - output "function_url" { description = "URL of the Cloud Function." value = module.function-hello.function.https_trigger_url diff --git a/networking/private-cloud-function-from-onprem/variables.tf b/networking/private-cloud-function-from-onprem/variables.tf index f263694d1..43f0d0385 100644 --- a/networking/private-cloud-function-from-onprem/variables.tf +++ b/networking/private-cloud-function-from-onprem/variables.tf @@ -14,10 +14,6 @@ * limitations under the License. */ -############################################################################### -# variables # -############################################################################### - variable "region" { description = "Region where the resources will be created." type = string diff --git a/tests/networking/private_cloud_function_from_onprem/test_plan.py b/tests/networking/private_cloud_function_from_onprem/test_plan.py index d367412ef..e315dbd05 100644 --- a/tests/networking/private_cloud_function_from_onprem/test_plan.py +++ b/tests/networking/private_cloud_function_from_onprem/test_plan.py @@ -24,4 +24,4 @@ def test_resources(e2e_plan_runner): "Test that plan works and the numbers of resources is as expected." modules, resources = e2e_plan_runner(FIXTURES_DIR) assert len(modules) == 10 - assert len(resources) == 41 + assert len(resources) == 40