Skip to content

Commit

Permalink
change test
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankf committed Dec 11, 2024
1 parent cf02cb9 commit fa93949
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions tests/basic.tftest.hcl
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
run "basic" {
variables {
resource_group = {
location = "eastus"
name = "my-rg"
}
provider "azurerm" {
features {}
}

variables {
resource_group = {
location = "eastus"
name = "my-rg"

vnet_name = "my-vnet"
vnet_address_space = ["10.0.0.0/8"]
Expand All @@ -30,26 +32,19 @@ run "basic" {
Environment = "Production"
}
}
}

run "setup" {
module {
source = "./"
}
}

providers = {
azurerm = {
features = {}
}
}

run "plan" {
command = plan

assert {
condition = output.resource_prefix == "abcdev-shrd-weu-myca"
error_message = "Unexpected output.resource_prefix value"
}

assert {
condition = output.subscription == "abcdev-shrd-sub"
error_message = "Unexpected output.subscription value"
condition = output.resource_group == "my-rg"
error_message = "Unexpected output.resource_group value"
}
}

0 comments on commit fa93949

Please sign in to comment.