Commit e0c6ec99 authored by MANISH KUMAR's avatar MANISH KUMAR
Browse files

Merge branch 'haaggarw/FixUT-WIP' into 'master'

Updating Unit Test Count for Airflow Multipartition

See merge request !428
parents 33d68d98 3c611257
Pipeline #56421 passed with stages
in 1 minute and 8 seconds
......@@ -42,6 +42,7 @@ steps:
TF_VAR_principal_password: $(TF_VAR_principal_password)
TF_VAR_principal_objectId: $(TF_VAR_principal_objectId)
TF_VAR_gitops_path: $(TF_VAR_gitops_path)
TF_VAR_deploy_dp_airflow: $(TF_VAR_deploy_dp_airflow)
TF_VAR_istio_int_load_balancer_ip: $(TF_VAR_istio_int_load_balancer_ip)
TF_VAR_aks_dns_host: $(TF_VAR_aks_dns_host)
${{ if ne(variables['TF_VAR_ssl_challenge_required'], '') }}:
......@@ -56,6 +57,10 @@ steps:
#!/usr/bin/env bash
set -euo pipefail
if [ $TF_VAR_deploy_dp_airflow != "true" ] && [ $TF_VAR_deploy_dp_airflow != "false" ]; then
export TF_VAR_deploy_dp_airflow=false
fi
export ARM_TENANT_ID=$tenantId
export ARM_CLIENT_SECRET=$servicePrincipalKey
export ARM_CLIENT_ID=$servicePrincipalId
......
......@@ -35,7 +35,12 @@ var tfOptions = &terraform.Options{
},
}
var deploy_dp_airflow = os.Getenv("TF_VAR_deploy_dp_airflow")
var airflow_dp_resource_count = 87
var expected_resource_count = 139
func TestTemplate(t *testing.T) {
expectedAppDevResourceGroup := asMap(t, `{
"location": "`+region+`"
}`)
......@@ -44,12 +49,16 @@ func TestTemplate(t *testing.T) {
"azurerm_resource_group.main": expectedAppDevResourceGroup,
}
if deploy_dp_airflow == "true" {
expected_resource_count = expected_resource_count + airflow_dp_resource_count
}
testFixture := infratests.UnitTestFixture{
GoTest: t,
TfOptions: tfOptions,
Workspace: workspace,
PlanAssertions: nil,
ExpectedResourceCount: 139,
ExpectedResourceCount: expected_resource_count,
ExpectedResourceAttributeValues: resourceDescription,
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment