From e50b20a6636415c3ba471c08213c97e8516d3396 Mon Sep 17 00:00:00 2001 From: jkallem-equinix <82848823+jkallem-equinix@users.noreply.github.com> Date: Fri, 28 Jun 2024 13:16:12 -0700 Subject: [PATCH] CXF-91821 Added Oracle Test to PROD GHA (#95) * CXF-91821 Added Oracle Test to PROD GHA * chore(deps): update actions/checkout digest to 692973e (#90) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * removed endpoint in the main.tf file * updated the PR Version to previous version --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/terratests-prod-suite.yaml | 3 +++ .../cloud-router-2-aws-connection/main.tf | 2 +- .../cloud-router-2-azure-connection/main.tf | 2 +- .../main.tf | 4 ++-- .../port-2-aws-connection/main.tf | 2 +- .../port-2-azure-connection/main.tf | 2 +- .../port-2-wan-connection/main.tf | 2 +- .../virtual-device-2-azure-connection/main.tf | 2 +- .../virtual-device-2-port-connection/main.tf | 2 +- .../virtual-device-2-wan-connection/main.tf | 2 +- tests/prod/prod_sanity_suite_test.go | 23 +++++++++++++++++++ 11 files changed, 36 insertions(+), 10 deletions(-) diff --git a/.github/workflows/terratests-prod-suite.yaml b/.github/workflows/terratests-prod-suite.yaml index 9e9215f2..815f4364 100644 --- a/.github/workflows/terratests-prod-suite.yaml +++ b/.github/workflows/terratests-prod-suite.yaml @@ -16,6 +16,7 @@ jobs: TEST_DATA_PROD_PORT_2_AZURE_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_AZURE_CONNECTION }} TEST_DATA_PROD_PORT_2_GOOGLE_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_GOOGLE_CONNECTION }} TEST_DATA_PROD_PORT_2_IBM2_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_IBM2_CONNECTION }} + TEST_DATA_PROD_PORT_2_ORACLE_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_ORACLE_CONNECTION }} TEST_DATA_PROD_PORT_2_PORT_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_PORT_CONNECTION }} TEST_DATA_PROD_PORT_2_PRIVATE_SERVICE_PROFILE_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_PRIVATE_SERVICE_PROFILE_CONNECTION }} TEST_DATA_PROD_PORT_2_WAN_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_WAN_CONNECTION }} @@ -67,6 +68,8 @@ jobs: jq --arg timestamp "$TIMESTAMP" '.connection_name = ($timestamp + "_" + .connection_name)' ./examples/port-2-google-connection/terraform.tfvars.json > ./examples/port-2-google-connection/tmp.test.json && mv ./examples/port-2-google-connection/tmp.test.json ./examples/port-2-google-connection/terraform.tfvars.json echo $TEST_DATA_PROD_PORT_2_IBM2_CONNECTION >> "./examples/port-2-ibm2-connection/terraform.tfvars.json" jq --arg timestamp "$TIMESTAMP$SUFFIX" '.connection_name += "" + $timestamp' ./examples/port-2-ibm2-connection/terraform.tfvars.json > ./examples/port-2-ibm2-connection/tmp.test.json && mv ./examples/port-2-ibm2-connection/tmp.test.json ./examples/port-2-ibm2-connection/terraform.tfvars.json + echo $TEST_DATA_PROD_PORT_2_ORACLE_CONNECTION >> "./examples/port-2-oracle-connection/terraform.tfvars.json" + jq --arg timestamp "$TIMESTAMP" '.connection_name = ($timestamp + "_" + .connection_name)' ./examples/port-2-oracle-connection/terraform.tfvars.json > ./examples/port-2-oracle-connection/tmp.test.json && mv ./examples/port-2-oracle-connection/tmp.test.json ./examples/port-2-oracle-connection/terraform.tfvars.json echo $TEST_DATA_PROD_PORT_2_PORT_CONNECTION >> "./examples/port-2-port-connection/terraform.tfvars.json" jq --arg timestamp "$TIMESTAMP" '.connection_name = ($timestamp + "_" + .connection_name)' ./examples/port-2-port-connection/terraform.tfvars.json > ./examples/port-2-port-connection/tmp.test.json && mv ./examples/port-2-port-connection/tmp.test.json ./examples/port-2-port-connection/terraform.tfvars.json echo $TEST_DATA_PROD_PORT_2_PRIVATE_SERVICE_PROFILE_CONNECTION >> "./examples/port-2-private-service-profile-connection/terraform.tfvars.json" diff --git a/tests/examples-without-external-providers/cloud-router-2-aws-connection/main.tf b/tests/examples-without-external-providers/cloud-router-2-aws-connection/main.tf index 61610fad..47a49a17 100644 --- a/tests/examples-without-external-providers/cloud-router-2-aws-connection/main.tf +++ b/tests/examples-without-external-providers/cloud-router-2-aws-connection/main.tf @@ -4,7 +4,7 @@ provider "equinix" { } module "cloud_router_aws_connection" { - source = "equinix/fabric/equinix//modules/cloud-router-connection" + source = "../../../modules/cloud-router-connection" connection_name = var.connection_name connection_type = var.connection_type diff --git a/tests/examples-without-external-providers/cloud-router-2-azure-connection/main.tf b/tests/examples-without-external-providers/cloud-router-2-azure-connection/main.tf index 2d4428fb..3f0ce0eb 100644 --- a/tests/examples-without-external-providers/cloud-router-2-azure-connection/main.tf +++ b/tests/examples-without-external-providers/cloud-router-2-azure-connection/main.tf @@ -4,7 +4,7 @@ provider "equinix" { } module "cloud_router_azure_connection" { - source = "equinix/fabric/equinix//modules/cloud-router-connection" + source = "../../../modules/cloud-router-connection" connection_name = var.connection_name connection_type = var.connection_type diff --git a/tests/examples-without-external-providers/cloud-router-2-port-routing-protocol-connection/main.tf b/tests/examples-without-external-providers/cloud-router-2-port-routing-protocol-connection/main.tf index c2981741..1b7135dc 100644 --- a/tests/examples-without-external-providers/cloud-router-2-port-routing-protocol-connection/main.tf +++ b/tests/examples-without-external-providers/cloud-router-2-port-routing-protocol-connection/main.tf @@ -4,7 +4,7 @@ provider "equinix" { } module "cloud_router_port_connection" { - source = "equinix/fabric/equinix//modules/cloud-router-connection" + source = "../../../modules/cloud-router-connection" connection_name = var.connection_name connection_type = var.connection_type @@ -25,7 +25,7 @@ module "cloud_router_port_connection" { module "routing_protocols" { depends_on = [module.cloud_router_port_connection] - source = "equinix/fabric/equinix//modules/routing-protocols" + source = "../../../modules/routing-protocols" connection_uuid = module.cloud_router_port_connection.primary_connection_id diff --git a/tests/examples-without-external-providers/port-2-aws-connection/main.tf b/tests/examples-without-external-providers/port-2-aws-connection/main.tf index d4f90b68..b15a934d 100644 --- a/tests/examples-without-external-providers/port-2-aws-connection/main.tf +++ b/tests/examples-without-external-providers/port-2-aws-connection/main.tf @@ -4,7 +4,7 @@ provider "equinix" { } module "port_2_aws_connection" { - source = "equinix/fabric/equinix//modules/port-connection" + source = "../../../modules/port-connection" connection_name = var.connection_name connection_type = var.connection_type diff --git a/tests/examples-without-external-providers/port-2-azure-connection/main.tf b/tests/examples-without-external-providers/port-2-azure-connection/main.tf index eeb53e07..de053fe9 100644 --- a/tests/examples-without-external-providers/port-2-azure-connection/main.tf +++ b/tests/examples-without-external-providers/port-2-azure-connection/main.tf @@ -3,7 +3,7 @@ provider "equinix" { client_secret = var.equinix_client_secret } module "create_port_2_azure_connection" { - source = "equinix/fabric/equinix//modules/port-connection" + source = "../../../modules/port-connection" connection_name = var.connection_name connection_type = var.connection_type diff --git a/tests/examples-without-external-providers/port-2-wan-connection/main.tf b/tests/examples-without-external-providers/port-2-wan-connection/main.tf index ea5cf85f..aa8dfc9f 100644 --- a/tests/examples-without-external-providers/port-2-wan-connection/main.tf +++ b/tests/examples-without-external-providers/port-2-wan-connection/main.tf @@ -4,7 +4,7 @@ provider "equinix" { } module "create_port_2_wan_connection" { - source = "equinix/fabric/equinix//modules/port-connection" + source = "../../../modules/port-connection" connection_name = var.connection_name connection_type = var.connection_type diff --git a/tests/examples-without-external-providers/virtual-device-2-azure-connection/main.tf b/tests/examples-without-external-providers/virtual-device-2-azure-connection/main.tf index 53b6b7da..7c8348dd 100644 --- a/tests/examples-without-external-providers/virtual-device-2-azure-connection/main.tf +++ b/tests/examples-without-external-providers/virtual-device-2-azure-connection/main.tf @@ -3,7 +3,7 @@ provider "equinix" { client_secret = var.equinix_client_secret } module "create_virtual_device_2_azure_connection" { - source = "equinix/fabric/equinix//modules/virtual-device-connection" + source = "../../../modules/virtual-device-connection" connection_name = var.connection_name connection_type = var.connection_type diff --git a/tests/examples-without-external-providers/virtual-device-2-port-connection/main.tf b/tests/examples-without-external-providers/virtual-device-2-port-connection/main.tf index c21047a6..70b5dded 100644 --- a/tests/examples-without-external-providers/virtual-device-2-port-connection/main.tf +++ b/tests/examples-without-external-providers/virtual-device-2-port-connection/main.tf @@ -3,7 +3,7 @@ provider "equinix" { client_secret = var.equinix_client_secret } module "create_virtual_device_2_port_connection" { - source = "equinix/fabric/equinix//modules/virtual-device-connection" + source = "../../../modules/virtual-device-connection" connection_name = var.connection_name connection_type = var.connection_type diff --git a/tests/examples-without-external-providers/virtual-device-2-wan-connection/main.tf b/tests/examples-without-external-providers/virtual-device-2-wan-connection/main.tf index fa2c5516..82eaf487 100644 --- a/tests/examples-without-external-providers/virtual-device-2-wan-connection/main.tf +++ b/tests/examples-without-external-providers/virtual-device-2-wan-connection/main.tf @@ -4,7 +4,7 @@ provider "equinix" { } module "create_virtual_device_2_wan_connection" { - source = "equinix/fabric/equinix//modules/virtual-device-connection" + source = "../../../modules/virtual-device-connection" connection_name = var.connection_name connection_type = var.connection_type diff --git a/tests/prod/prod_sanity_suite_test.go b/tests/prod/prod_sanity_suite_test.go index d6461dea..046701fc 100644 --- a/tests/prod/prod_sanity_suite_test.go +++ b/tests/prod/prod_sanity_suite_test.go @@ -92,6 +92,20 @@ func TestPort2Ibm2CreateConnection_DIGP(t *testing.T) { assert.NotNil(t, output) } +func TestPort2OracleCreateConnection_DIGP(t *testing.T) { + + terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ + TerraformDir: "../../examples/port-2-oracle-connection", + }) + + defer terraform.Destroy(t, terraformOptions) + t.Parallel() + + terraform.InitAndApply(t, terraformOptions) + output := terraform.Output(t, terraformOptions, "oracle_connection_id") + assert.NotNil(t, output) +} + func TestPort2PortCreateConnection_DIGP(t *testing.T) { terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ @@ -191,6 +205,15 @@ func TestCloudRouter2PortRoutingProtocolCreateConnection_DIGP(t *testing.T) { terraform.InitAndApply(t, terraformOptions) output := terraform.Output(t, terraformOptions, "port_connection_id") assert.NotNil(t, output) + + terraformOptions = terraform.WithDefaultRetryableErrors(t, &terraform.Options{ + Vars: map[string]interface{}{ + "connection_name": "FCR2Port_Name_Update", + "bandwidth": 100, + }, + TerraformDir: "../../tests/examples-without-external-providers/cloud-router-2-port-routing-protocol-connection", + }) + terraform.Apply(t, terraformOptions) } func TestCloudRouter2ServiceProfileCreateConnection_DIGP(t *testing.T) {