-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CXF 88608: UAT Terratest workflow for Cloud Router Connectivity #44
Changes from 21 commits
3c8a96d
8408e2f
b0d3f93
c6cb89f
7128c5f
f68b97c
31c2409
c4d7eed
62f8bba
1859910
5af709f
ac2e73b
151736a
9a73f6b
417488b
fd807b5
b6d21e7
e0516c4
29002b7
6b9e316
5fb7252
2ff8279
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,77 @@ | ||
name: terratests-uat-suite | ||
name: terratests-examples-without-external-providers-suite | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
setup-tests: | ||
name: Setup UAT Tests | ||
test-PNFV: | ||
name: Setup UAT PNFV Tests | ||
runs-on: ubuntu-latest | ||
env: | ||
TF_VAR_equinix_client_id: ${{ secrets.EQUINIX_CLIENT_ID_PNFV }} | ||
TF_VAR_equinix_client_secret: ${{ secrets.EQUINIX_CLIENT_SECRET_PNFV }} | ||
EQUINIX_API_ENDPOINT: "https://uatapi.equinix.com" | ||
TEST_DATA_UAT_PORT_2_ALIBABA_CONNECTION: ${{ secrets.TEST_DATA_UAT_PORT_2_ALIBABA_CONNECTION }} | ||
|
||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha || github.ref }} | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: './go.mod' | ||
id: go | ||
|
||
- name: Get dependencies | ||
run: | | ||
go mod download | ||
- uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_version: ${{ matrix.terraform }} | ||
terraform_wrapper: false | ||
|
||
- name: Setup Variables Files | ||
run: | | ||
echo $TEST_DATA_UAT_PORT_2_ALIBABA_CONNECTION >> "./examples/port-2-alibaba-connection/terraform.tfvars.json" | ||
|
||
- name: Run Go Tests | ||
run: | ||
go test ./tests/uat -v -coverprofile coverage_uat_modules.txt -covermode=atomic -count 1 -parallel 8 -run "(PNFV)" -timeout 180m | ||
|
||
- name: Setup Node.js 20.11.1 | ||
uses: actions/setup-node@v2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can be removed. Not doing anything. |
||
with: | ||
node-version: 20.11.1 | ||
|
||
- name: Upload test coverage to Codecov | ||
if: ${{ always() }} | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage_uat_modules.txt | ||
|
||
test-PFCR: | ||
name: Setup UAT PFCR Tests | ||
runs-on: ubuntu-latest | ||
env: | ||
TF_VAR_equinix_client_id: ${{ secrets.EQUINIX_CLIENT_ID_PFCR }} | ||
TF_VAR_equinix_client_secret: ${{ secrets.EQUINIX_CLIENT_SECRET_PFCR }} | ||
EQUINIX_API_ENDPOINT: "https://uatapi.equinix.com" | ||
TEST_DATA_UAT_PORT_2_AWS_CONNECTION: ${{ secrets.TEST_DATA_UAT_PORT_2_AWS_CONNECTION }} | ||
TEST_DATA_UAT_PORT_2_AZURE_CONNECTION: ${{ secrets.TEST_DATA_UAT_PORT_2_AZURE_CONNECTION }} | ||
TEST_DATA_UAT_PORT_2_IBM2_CONNECTION: ${{ secrets.TEST_DATA_UAT_PORT_2_IBM2_CONNECTION }} | ||
TEST_DATA_UAT_PORT_2_PORT_CONNECTION: ${{ secrets.TEST_DATA_UAT_PORT_2_PORT_CONNECTION }} | ||
TEST_DATA_UAT_PORT_2_PRIVATE_SERVICE_PROFILE_CONNECTION: ${{ secrets.TEST_DATA_UAT_PORT_2_PRIVATE_SERVICE_PROFILE_CONNECTION }} | ||
TEST_DATA_UAT_PORT_2_PUBLIC_SERVICE_PROFILE_CONNECTION: ${{ secrets.TEST_DATA_UAT_PORT_2_PUBLIC_SERVICE_PROFILE_CONNECTION }} | ||
TEST_DATA_UAT_CLOUD_ROUTER_2_AWS_CONNECTION: ${{secrets.TEST_DATA_UAT_CLOUD_ROUTER_2_AWS_CONNECTION}} | ||
TEST_DATA_UAT_CLOUD_ROUTER_2_AZURE_CONNECTION: ${{secrets.TEST_DATA_UAT_CLOUD_ROUTER_2_AZURE_CONNECTION}} | ||
TEST_DATA_UAT_CLOUD_ROUTER_2_PORT_ROUTING_PROTOCOL_CONNECTION: ${{secrets.TEST_DATA_UAT_CLOUD_ROUTER_2_PORT_ROUTING_PROTOCOL_CONNECTION}} | ||
TEST_DATA_UAT_CLOUD_ROUTER_2_SERVICE_PROFILE_CONNECTION: ${{secrets.TEST_DATA_UAT_CLOUD_ROUTER_2_SERVICE_PROFILE_CONNECTION}} | ||
TEST_DATA_UAT_CLOUD_ROUTER_2_WAN_CONNECTION: ${{secrets.TEST_DATA_UAT_CLOUD_ROUTER_2_WAN_CONNECTION}} | ||
|
||
steps: | ||
- name: Check out code into the Go module directory | ||
|
@@ -32,34 +87,39 @@ jobs: | |
|
||
- name: Get dependencies | ||
run: | | ||
go mod download | ||
go mod download | ||
- uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_version: ${{ matrix.terraform }} | ||
terraform_wrapper: false | ||
|
||
- name: Setup Variables Files | ||
run: | | ||
echo $TEST_DATA_UAT_PORT_2_ALIBABA_CONNECTION >> "./examples/port-2-alibaba-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_PORT_2_AWS_CONNECTION >> "./tests/uat/port-2-aws-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_PORT_2_AZURE_CONNECTION >> "./tests/uat/port-2-azure-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_PORT_2_AWS_CONNECTION >> "./tests/examples-without-external-providers/port-2-aws-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_PORT_2_AZURE_CONNECTION >> "./tests/examples-without-external-providers/port-2-azure-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_PORT_2_IBM2_CONNECTION >> "./examples/port-2-ibm2-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_PORT_2_PORT_CONNECTION >> "./examples/port-2-port-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_PORT_2_PRIVATE_SERVICE_PROFILE_CONNECTION >> "./examples/port-2-private-service-profile-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_PORT_2_PUBLIC_SERVICE_PROFILE_CONNECTION >> "./examples/port-2-public-service-profile-connection/terraform.tfvars.json" | ||
|
||
echo $TEST_DATA_UAT_CLOUD_ROUTER_2_AWS_CONNECTION >> "./tests/examples-without-external-providers/cloud-router-2-aws-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_CLOUD_ROUTER_2_AZURE_CONNECTION >> "./tests/examples-without-external-providers/cloud-router-2-azure-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_CLOUD_ROUTER_2_PORT_ROUTING_PROTOCOL_CONNECTION >> "./tests/examples-without-external-providers/cloud-router-2-port-routing-protocol-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_CLOUD_ROUTER_2_SERVICE_PROFILE_CONNECTION >> "./examples/cloud-router-2-service-profile-connection/terraform.tfvars.json" | ||
echo $TEST_DATA_UAT_CLOUD_ROUTER_2_WAN_CONNECTION >> "./examples/cloud-router-2-wan-connection/terraform.tfvars.json" | ||
|
||
- name: Run Go Tests | ||
run: | ||
go test ./tests/uat -v -coverprofile coverage_uat_modules.txt -covermode=atomic -count 1 -parallel 8 -timeout 180m | ||
go test ./tests/uat -v -coverprofile coverage_uat_modules.txt -covermode=atomic -count 1 -parallel 8 -run "(PFCR)" -timeout 180m | ||
|
||
- name: Setup Node.js 20.11.1 | ||
uses: actions/setup-node@v2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can be removed. Step not doing anything. |
||
with: | ||
node-version: 20.11.1 | ||
node-version: 20.11.1 | ||
|
||
- name: Upload test coverage to Codecov | ||
if: ${{ always() }} | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage_uat_modules.txt | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage_uat_modules.txt |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ variable "aside_fcr_uuid" { | |
variable "zside_ap_authentication_key" { | ||
description = "Authentication key for provider based connections" | ||
type = string | ||
sensitive = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should still be |
||
default = "" | ||
} | ||
variable "zside_ap_type" { | ||
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
output "module_output" { | ||
output "wan_connection_id" { | ||
value = module.cloud_router_wan_connection.primary_connection_id | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
module "cloud_router_aws_connection" { | ||
source = "equinix/fabric/equinix//modules/cloud-router-connection" | ||
|
||
connection_name = var.connection_name | ||
connection_type = var.connection_type | ||
notifications_type = var.notifications_type | ||
notifications_emails = var.notifications_emails | ||
additional_info = var.additional_info | ||
bandwidth = var.bandwidth | ||
purchase_order_number = var.purchase_order_number | ||
|
||
#Aside | ||
aside_fcr_uuid = var.aside_fcr_uuid | ||
aside_ap_type = var.aside_ap_type | ||
|
||
#Zside | ||
zside_ap_type = var.zside_ap_type | ||
zside_ap_authentication_key = var.zside_ap_authentication_key | ||
zside_ap_profile_type = var.zside_ap_profile_type | ||
zside_location = var.zside_location | ||
zside_seller_region = var.zside_seller_region | ||
zside_fabric_sp_name = var.zside_fabric_sp_name | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
output "aws_connection_id" { | ||
value = module.cloud_router_aws_connection.primary_connection_id | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
variable "equinix_client_id" { | ||
description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" | ||
type = string | ||
sensitive = true | ||
} | ||
variable "equinix_client_secret" { | ||
description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" | ||
type = string | ||
sensitive = true | ||
} | ||
variable "connection_name" { | ||
description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" | ||
type = string | ||
} | ||
variable "connection_type" { | ||
description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" | ||
default = "" | ||
type = string | ||
} | ||
variable "notifications_type" { | ||
description = "Notification Type - ALL is the only type currently supported" | ||
type = string | ||
default = "ALL" | ||
} | ||
variable "notifications_emails" { | ||
description = "Array of contact emails" | ||
type = list(string) | ||
} | ||
variable "bandwidth" { | ||
description = "Connection bandwidth in Mbps" | ||
type = number | ||
} | ||
variable "purchase_order_number" { | ||
description = "Purchase order number" | ||
type = string | ||
default = "" | ||
} | ||
variable "aside_ap_type" { | ||
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" | ||
type = string | ||
} | ||
variable "aside_fcr_uuid" { | ||
description = "Equinix-assigned Fabric Cloud Router identifier" | ||
type = string | ||
} | ||
variable "zside_ap_authentication_key" { | ||
description = "Authentication key for provider based connections" | ||
type = string | ||
sensitive = true | ||
} | ||
variable "zside_ap_type" { | ||
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" | ||
type = string | ||
default = "SP" | ||
} | ||
variable "zside_ap_profile_type" { | ||
description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" | ||
type = string | ||
default = "L2_PROFILE" | ||
} | ||
variable "zside_location" { | ||
description = "Access point metro code" | ||
type = string | ||
default = "SP" | ||
} | ||
variable "zside_fabric_sp_name" { | ||
description = "Equinix Service Profile Name" | ||
type = string | ||
default = "" | ||
} | ||
variable "zside_seller_region" { | ||
description = "Access point seller region" | ||
type = string | ||
default = "" | ||
} | ||
variable "additional_info" { | ||
description = "Additional parameters required for some service profiles. It should be a list of maps containing 'key' and 'value e.g. `[{ key='asn' value = '65000'}, { key='ip' value = '192.168.0.1'}]`" | ||
type = list(object({ key = string, value = string })) | ||
default = [] | ||
sensitive = true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
module "cloud_router_azure_connection" { | ||
source = "equinix/fabric/equinix//modules/cloud-router-connection" | ||
|
||
connection_name = var.connection_name | ||
connection_type = var.connection_type | ||
notifications_type = var.notifications_type | ||
notifications_emails = var.notifications_emails | ||
bandwidth = var.bandwidth | ||
purchase_order_number = var.purchase_order_number | ||
|
||
#Aside | ||
aside_ap_type = var.aside_ap_type | ||
aside_fcr_uuid = var.aside_fcr_uuid | ||
|
||
#Zside | ||
zside_ap_type = var.zside_ap_type | ||
zside_ap_authentication_key = var.zside_ap_authentication_key | ||
zside_ap_profile_type = var.zside_ap_profile_type | ||
zside_location = var.zside_location | ||
zside_peering_type = var.zside_peering_type | ||
zside_fabric_sp_name = var.zside_fabric_sp_name | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
output "azure_connection_id" { | ||
value = module.cloud_router_azure_connection.primary_connection_id | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
variable "equinix_client_id" { | ||
description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" | ||
type = string | ||
sensitive = true | ||
} | ||
variable "equinix_client_secret" { | ||
description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" | ||
type = string | ||
sensitive = true | ||
} | ||
variable "connection_name" { | ||
description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores" | ||
type = string | ||
} | ||
variable "connection_type" { | ||
description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC" | ||
type = string | ||
default = "" | ||
} | ||
variable "bandwidth" { | ||
description = "Connection bandwidth in Mbps" | ||
type = number | ||
} | ||
variable "notifications_type" { | ||
description = "Notification Type - ALL is the only type currently supported" | ||
type = string | ||
default = "ALL" | ||
} | ||
variable "notifications_emails" { | ||
description = "Array of contact emails" | ||
type = list(string) | ||
} | ||
variable "purchase_order_number" { | ||
description = "Purchase order number" | ||
type = string | ||
default = "" | ||
} | ||
variable "aside_ap_type" { | ||
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" | ||
type = string | ||
} | ||
variable "aside_fcr_uuid" { | ||
description = "Equinix-assigned Fabric Cloud Router identifier" | ||
type = string | ||
} | ||
variable "zside_ap_type" { | ||
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW" | ||
type = string | ||
default = "SP" | ||
} | ||
variable "zside_ap_profile_type" { | ||
description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE" | ||
type = string | ||
default = "L2_PROFILE" | ||
} | ||
variable "zside_location" { | ||
description = "Access point metro code" | ||
type = string | ||
default = "SP" | ||
} | ||
variable "zside_peering_type" { | ||
description = "Access point peering type - PRIVATE, MICROSOFT, PUBLIC, MANUAL" | ||
default = "PRIVATE" | ||
} | ||
|
||
variable "zside_fabric_sp_name" { | ||
description = "Equinix Service Profile Name" | ||
type = string | ||
default = "" | ||
} | ||
variable "zside_ap_authentication_key" { | ||
description = "Authentication key for provider based connections" | ||
type = string | ||
sensitive = true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
terratests-uat-suite
was the correct name here.