Skip to content

Commit

Permalink
CXF-91821 Added Oracle Test to PROD GHA (#95)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
jkallem-equinix and renovate[bot] committed Jun 28, 2024
1 parent 7a60a87 commit e50b20a
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/terratests-prod-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions tests/prod/prod_sanity_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit e50b20a

Please sign in to comment.