Integrate review comments on naming of test files

This commit is contained in:
manojvazirani 2019-04-08 11:08:53 -04:00
Родитель b2cbf45bf8
Коммит 63b3d60009
5 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -13,18 +13,18 @@ Fill the values required below in test_backend.tfvars using [this](../../shared/
- Storage Account Container Name
- Key Name to store for Terraform State for Test Environment
#### Folder test1 contains test1.tf
#### Folder backend_create_multiple_resource_test1 contains backend_create_multiple_resource_test1.tf
1. Deploy Resource Group
2. Deploy KeyVault1
- Should deploy above resources
#### Folder test2 contains test2.tf
#### Folder backend_create_multiple_resource_test2 contains backend_create_multiple_resource_test2.tf
1. Deploy Resource Group
2. Deploy KeyVault1
3. Deploy KeyVault2
- Should not change/deploy resource 1 and 2. Only deploy resource 3.
#### Folder test3 contains test3.tf
#### Folder backend_create_multiple_resource_test3 contains backend_create_multiple_resource_test3.tf
1. Deploy Resource Group
2. Deploy KeyVault1
3. Deploy KeyVault2

Просмотреть файл

@ -2,16 +2,16 @@
set -euo pipefail
#Cleanup
terraform init -backend-config=./test_backend.tfvars test3
terraform destroy -auto-approve test3
terraform init -backend-config=./test_backend.tfvars backend_create_multiple_resource_test3
terraform destroy -auto-approve backend_create_multiple_resource_test3
#Check if resource group exists
#Resource group does not exists
assertRG core-usea-rg-test not
#Create Resource group and Keyvault 1
terraform init -backend-config=./test_backend.tfvars test1
terraform apply -auto-approve test1
terraform init -backend-config=./test_backend.tfvars backend_create_multiple_resource_test1
terraform apply -auto-approve backend_create_multiple_resource_test1
#Check if resource group exists
assertRG core-usea-rg-test
@ -20,9 +20,9 @@ assertResource core-usea-rg-test "Microsoft.KeyVault/vaults" core-usea-kv1-test
#Key Vault 2 does not exists
assertResource core-usea-rg-test "Microsoft.KeyVault/vaults" core-usea-kv2-test not
terraform init -backend-config=./test_backend.tfvars test2
terraform init -backend-config=./test_backend.tfvars backend_create_multiple_resource_test2
#Deploy Key Vault 2 only
terraform apply -auto-approve test2
terraform apply -auto-approve backend_create_multiple_resource_test2
assertRG core-usea-rg-test
assertResource core-usea-rg-test "Microsoft.KeyVault/vaults" core-usea-kv1-test
@ -30,8 +30,8 @@ assertResource core-usea-rg-test "Microsoft.KeyVault/vaults" core-usea-kv2-test
before=`az resource list -g core-usea-rg-test --resource-type Microsoft.KeyVault/vaults --query '[].name' --o tsv | wc -l`
#Deploy Nothing since resources are already deployed
terraform init -backend-config=./test_backend.tfvars test3
terraform apply -auto-approve test3
terraform init -backend-config=./test_backend.tfvars backend_create_multiple_resource_test3
terraform apply -auto-approve backend_create_multiple_resource_test3
after=`az resource list -g core-usea-rg-test --resource-type Microsoft.KeyVault/vaults --query '[].name' --o tsv | wc -l`
assertRG core-usea-rg-test
assertResource core-usea-rg-test "Microsoft.KeyVault/vaults" core-usea-kv1-test
@ -44,4 +44,4 @@ else
printf "\e[0;31mTest Failed... \n"
fi
terraform destroy -auto-approve test3
terraform destroy -auto-approve backend_create_multiple_resource_test3