Skip to content

Commit 7b5da4f

Browse files
committed
feat: enable terraform test by default
1 parent 438fac5 commit 7b5da4f

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

tests/basic.tftest.hcl

+19-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
11
mock_provider "aws" {
2-
2+
mock_data "aws_availability_zones" {
3+
defaults = {
4+
names = [
5+
"eu-west-1a",
6+
"eu-west-1b",
7+
"eu-west-1c"
8+
]
9+
}
10+
}
311
}
412

513
run "basic_resolver" {
614
command = plan
715

816
variables {
9-
resolver_name = "test"
10-
resolver_vpc_id = "vpc-abc123"
11-
12-
resolver_subnet_ids = [
13-
"subnet-abc123",
14-
"subnet-def456",
15-
]
17+
resolver_name = "test"
18+
resolver_protocols = ["Do53"]
19+
network = {
20+
vpc_cidr = "10.90.0.0/21"
21+
transit_gateway_id = "tgw-04ad8f026be8b7eb6"
22+
}
23+
tags = {
24+
"Environment" = "Testing"
25+
"GitRepo" = "https://github.com/appvia/terraform-aws-dns"
26+
}
1627
}
1728

1829
assert {
@@ -34,9 +45,4 @@ run "basic_resolver" {
3445
condition = aws_route53_resolver_endpoint.this.resolver_endpoint_type == "IPV4"
3546
error_message = "Resolver endpoint type should be IPV4"
3647
}
37-
38-
assert {
39-
condition = aws_security_group.this.name == "${var.resolver_name}-sg"
40-
error_message = "Expected security group name to have -sg suffix"
41-
}
4248
}

0 commit comments

Comments
 (0)