Skip to content

Commit

Permalink
refactor: remove prior e2e tests that are now replaced with terratest
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs committed Apr 20, 2022
1 parent 33053a8 commit 4379d40
Show file tree
Hide file tree
Showing 27 changed files with 21 additions and 404 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/e2e-parallel-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ jobs:
- name: Pre Setup
id: pre-setup
run: |
mkdir -p deploy/e2e/gh-e2e-test
mkdir -p deploy/e2e-test
if [[ ${{ matrix.example_path }} == deploy/* ]]
then
echo "Skipping pre-setup for ${{ matrix.example_path }}"
cp -R ${{ matrix.example_path }}/* deploy/e2e/gh-e2e-test/
cp -R ${{ matrix.example_path }}/* deploy/e2e-test/
else
echo "Running pre-setup for ${{ matrix.example_path }}"
cp -R deploy/e2e/gh-e2e-template/* deploy/e2e/gh-e2e-test/
sed -i "s!REPLACE_ME!${{ matrix.tenant_name }}!g" deploy/e2e/gh-e2e-test/base.tfvars
sed -i "s!TF_STATE_PATH!${{ matrix.example_path }}!g" deploy/e2e/gh-e2e-test/backend.conf
sed -i "s!EXAMPLE_PATH!${{ matrix.example_path }}!g" deploy/e2e/gh-e2e-test/main.tf
cp -R deploy/e2e-template/* deploy/e2e-test/
sed -i "s!REPLACE_ME!${{ matrix.tenant_name }}!g" deploy/e2e-test/base.tfvars
sed -i "s!TF_STATE_PATH!${{ matrix.example_path }}!g" deploy/e2e-test/backend.conf
sed -i "s!EXAMPLE_PATH!${{ matrix.example_path }}!g" deploy/e2e-test/main.tf
fi
continue-on-error: false

Expand Down Expand Up @@ -123,24 +123,24 @@ jobs:
- name: Terraform Init
id: init
run: terraform init -backend-config backend.conf -reconfigure
working-directory: deploy/e2e/gh-e2e-test
working-directory: deploy/e2e-test
continue-on-error: false

- name: Terraform Validate
id: validate
working-directory: deploy/e2e/gh-e2e-test
working-directory: deploy/e2e-test
run: terraform validate -no-color
continue-on-error: false

- name: Terraform Plan Destroy
id: plan-destroy
working-directory: deploy/e2e/gh-e2e-test
working-directory: deploy/e2e-test
run: terraform plan -destroy -var-file base.tfvars -no-color
continue-on-error: false

- name: Terraform Destroy
id: destroy
working-directory: deploy/e2e/gh-e2e-test
working-directory: deploy/e2e-test
run: |
reverse_array=$(echo ${{ env.DEPLOYMENT_ORDER }} | awk -F, '{for (i=NF; i>0; --i) printf "%s%s", (i<NF ? "," : ""), $i; printf "\n"}')
IFS=',' read -r -a array <<< "$reverse_array"
Expand Down
25 changes: 11 additions & 14 deletions .github/workflows/e2e-parallel-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
tenant_name: "emr-eks"
- example_path: examples/analytics/spark-k8s-operator
tenant_name: "spark"
# This is example that we can use test from deploy folder, see logic in the pre setup step
# - example_path: deploy/e2e/vpc
# tenant_name: "vpc"
- example_path: examples/multi-tenancy-with-teams
tenant_name: "teams"
- example_path: examples/gitops/argocd
Expand Down Expand Up @@ -76,17 +73,17 @@ jobs:
- name: Pre Setup
id: pre-setup
run: |
mkdir -p deploy/e2e/gh-e2e-test
mkdir -p deploy/e2e-test
if [[ ${{ matrix.example_path }} == deploy/* ]]
then
echo "Skipping pre-setup for ${{ matrix.example_path }}"
cp -R ${{ matrix.example_path }}/* deploy/e2e/gh-e2e-test/
cp -R ${{ matrix.example_path }}/* deploy/e2e-test/
else
echo "Running pre-setup for ${{ matrix.example_path }}"
cp -R deploy/e2e/gh-e2e-template/* deploy/e2e/gh-e2e-test/
sed -i "s!REPLACE_ME!${{ matrix.tenant_name }}!g" deploy/e2e/gh-e2e-test/base.tfvars
sed -i "s!TF_STATE_PATH!${{ matrix.example_path }}!g" deploy/e2e/gh-e2e-test/backend.conf
sed -i "s!EXAMPLE_PATH!${{ matrix.example_path }}!g" deploy/e2e/gh-e2e-test/main.tf
cp -R deploy/e2e-template/* deploy/e2e-test/
sed -i "s!REPLACE_ME!${{ matrix.tenant_name }}!g" deploy/e2e-test/base.tfvars
sed -i "s!TF_STATE_PATH!${{ matrix.example_path }}!g" deploy/e2e-test/backend.conf
sed -i "s!EXAMPLE_PATH!${{ matrix.example_path }}!g" deploy/e2e-test/main.tf
fi
continue-on-error: false

Expand Down Expand Up @@ -125,24 +122,24 @@ jobs:
- name: Terraform Init
id: init
run: terraform init -backend-config backend.conf -reconfigure
working-directory: deploy/e2e/gh-e2e-test
working-directory: deploy/e2e-test
continue-on-error: false

- name: Terraform Validate
id: validate
working-directory: deploy/e2e/gh-e2e-test
working-directory: deploy/e2e-test
run: terraform validate -no-color
continue-on-error: false

- name: Terraform Plan
id: plan
working-directory: deploy/e2e/gh-e2e-test
working-directory: deploy/e2e-test
run: terraform plan -var-file base.tfvars -no-color
continue-on-error: false

- name: Terraform Apply
id: apply
working-directory: deploy/e2e/gh-e2e-test
working-directory: deploy/e2e-test
run: |
IFS=',' read -r -a array <<< "${{ env.DEPLOYMENT_ORDER }}"
for element in "${array[@]}"
Expand All @@ -155,7 +152,7 @@ jobs:
- name: Terraform Destroy
if: github.event.inputs.TFDestroy == 'true' && (steps.apply.outcome == 'success' || steps.apply.outcome == 'failure')
id: destroy
working-directory: deploy/e2e/gh-e2e-test
working-directory: deploy/e2e-test
run: |
reverse_array=$(echo ${{ env.DEPLOYMENT_ORDER }} | awk -F, '{for (i=NF; i>0; --i) printf "%s%s", (i<NF ? "," : ""), $i; printf "\n"}')
IFS=',' read -r -a array <<< "$reverse_array"
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/e2e-test-cleanup.yml

This file was deleted.

75 changes: 0 additions & 75 deletions .github/workflows/e2e-test.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/vpc-test-cleanup.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/vpc-test.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions deploy/e2e/eks/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions deploy/e2e/eks/backend.conf

This file was deleted.

6 changes: 0 additions & 6 deletions deploy/e2e/eks/base.tfvars

This file was deleted.

Loading

0 comments on commit 4379d40

Please sign in to comment.