Skip to content
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

feat: Adding GHA workflow for UAT Test Suite #40

Closed
wants to merge 65 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
12683ca
feat: Adding GHA workflow for UAT Test Suite
srushti-patl Mar 4, 2024
16eac41
fix: Fixing UAT workflow
srushti-patl Mar 4, 2024
87674db
misc: adding go.sum file
srushti-patl Mar 4, 2024
553d9ee
misc: updating go version
srushti-patl Mar 4, 2024
bba1ee8
misc: updating go version to 1.21
srushti-patl Mar 4, 2024
18dd521
misc: updating go.mod file
srushti-patl Mar 4, 2024
7fc34ef
misc: Updating workflow for fetching secrets
srushti-patl Mar 4, 2024
1f26af7
misc: Updating workflow to fetch secrets
srushti-patl Mar 5, 2024
df5d772
misc: Updating the delimiter to a single character.
srushti-patl Mar 5, 2024
aeaf096
misc: testing directory path in workflow
srushti-patl Mar 5, 2024
bcc7002
misc: testing directory path in workflow
srushti-patl Mar 5, 2024
29ab8b1
misc: removing done from setup variables workflow job
srushti-patl Mar 5, 2024
e3260f7
misc: Updating setup variables workflow job
srushti-patl Mar 5, 2024
1e1f287
misc: Updating setup variables workflow job
srushti-patl Mar 5, 2024
af8c4d7
misc:Updating setup variables workflow job with github CLI commands
srushti-patl Mar 5, 2024
9b2b56f
misc:updating setup_output command
srushti-patl Mar 5, 2024
7c1ebb6
misc:updating github_output command
srushti-patl Mar 5, 2024
735f4d8
misc:updating setup variables files job
srushti-patl Mar 5, 2024
e8d4029
misc:updating setup variables files job
srushti-patl Mar 5, 2024
7e3f043
misc:updating setup variables files job
srushti-patl Mar 5, 2024
be349ed
misc:updating setup variables files job
srushti-patl Mar 5, 2024
d759946
misc:updating setup variables files job
srushti-patl Mar 5, 2024
fc34e5e
misc:updating setup variables files job
srushti-patl Mar 5, 2024
b3c339f
misc:updating setup variables files job
srushti-patl Mar 5, 2024
3e5caaf
misc:updating setup variables files job
srushti-patl Mar 5, 2024
7fc4db8
misc:updating setup variables files job
srushti-patl Mar 5, 2024
b5d3ac9
misc: ""
srushti-patl Mar 5, 2024
ec3cde5
misc: ""
srushti-patl Mar 5, 2024
3377efb
misc: ""
srushti-patl Mar 6, 2024
dbfee1c
misc: ""
srushti-patl Mar 6, 2024
19b3328
misc: ""
srushti-patl Mar 6, 2024
f76fdfd
misc: ""
srushti-patl Mar 6, 2024
76fcef1
misc: ""
srushti-patl Mar 7, 2024
e07b517
misc: ""
srushti-patl Mar 7, 2024
4d9e1dd
misc: ""
srushti-patl Mar 7, 2024
f8fb806
misc: ""
srushti-patl Mar 7, 2024
a088b35
misc: ""
srushti-patl Mar 7, 2024
ba4f0f8
misc: ""
srushti-patl Mar 7, 2024
ee01f87
misc: ""
srushti-patl Mar 7, 2024
97fc670
misc: ""
srushti-patl Mar 7, 2024
00ef42d
misc: ""
srushti-patl Mar 7, 2024
736acdc
misc: ""
srushti-patl Mar 7, 2024
727176a
misc: ""
srushti-patl Mar 7, 2024
b291efe
misc: ""
srushti-patl Mar 7, 2024
8a088cd
misc: ""
srushti-patl Mar 7, 2024
87c35a8
misc: ""
srushti-patl Mar 7, 2024
fa028c9
Merge remote-tracking branch 'origin/CXf-88606-GHA-UAT-Test-Suite' in…
srushti-patl Mar 7, 2024
5d22884
misc: ""
srushti-patl Mar 7, 2024
e11ad57
misc: ""
srushti-patl Mar 7, 2024
abe68c4
misc: ""
srushti-patl Mar 7, 2024
e720c10
misc: ""
srushti-patl Mar 7, 2024
faaa290
misc: ""
srushti-patl Mar 7, 2024
49045b1
misc: ""
srushti-patl Mar 7, 2024
44a586b
misc: ""
srushti-patl Mar 7, 2024
742163a
misc: ""
srushti-patl Mar 7, 2024
f6a68c7
misc: ""
srushti-patl Mar 7, 2024
929b430
misc: ""
srushti-patl Mar 7, 2024
57bf28d
misc: ""
srushti-patl Mar 7, 2024
cd0e5e5
misc: ""
srushti-patl Mar 7, 2024
70be580
misc: ""
srushti-patl Mar 7, 2024
fbbf5ba
misc: ""
srushti-patl Mar 7, 2024
b7dc7bb
misc: ""
srushti-patl Mar 7, 2024
4d3d61b
misc: ""
srushti-patl Mar 8, 2024
9c416dc
misc: ""
srushti-patl Mar 8, 2024
9c63f80
misc: ""
srushti-patl Mar 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/test-uat-suite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: terratests-uat-suite

on:
pull_request:
workflow_dispatch:

jobs:
setup-tests:
name: Setup UAT Tests
runs-on: ubuntu-latest
env:
EQUINIX_API_ENDPOINT: "https://uatapi.equinix.com"

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: |

for list in ./examples/*; do
if [[ "$list" == *"port-2-port-connection"* ]]; then
directory_name=$(basename "$list")
secret_value="{{ secrets[format('TEST_DATA_UAT_{0}','$directory_name')] }}"
echo $secret_value >> "$list/terraform.tfvars.json"
fi
done
printf '%s\n' "${DirectoryList[@]}"

- name: Run Go Tests
run:
go test ./tests/uat -v -coverprofile coverage_uat_modules.txt -covermode=atomic -count 1 -parallel 8 -timeout 180m

- name: Upload test coverage to Codecov
if: ${{ always() }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage_uat_modules.txt
2 changes: 2 additions & 0 deletions examples/port-2-port-connection/variables.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
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" {
Expand Down
59 changes: 59 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
module github.com/equinix/terraform-equinix-fabric

go 1.21

require (
github.com/gruntwork-io/terratest v0.43.0
github.com/stretchr/testify v1.8.4
)

require (
cloud.google.com/go v0.105.0 // indirect
cloud.google.com/go/compute v1.12.1 // indirect
cloud.google.com/go/compute/metadata v0.2.1 // indirect
cloud.google.com/go/iam v0.7.0 // indirect
cloud.google.com/go/storage v1.27.0 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/aws/aws-sdk-go v1.44.122 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.1 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.9.1 // indirect
github.com/hashicorp/terraform-json v0.13.0 // indirect
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.15.11 // indirect
github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/tmccombs/hcl2json v0.3.3 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/zclconf/go-cty v1.9.1 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.103.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c // indirect
google.golang.org/grpc v1.51.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading