Skip to content

Commit 649833b

Browse files
committed
chore: added additional unit tests
1 parent d9adbe7 commit 649833b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/module.tftest.hcl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ mock_provider "aws" {
99
}
1010
}
1111

12+
mock_data "aws_route53_resolver_rules" {
13+
defaults = {
14+
resolver_rule_ids = [
15+
"rslvr-rr-1234567890",
16+
]
17+
}
18+
}
19+
1220
mock_data "aws_region" {
1321
defaults = {
1422
name = "eu-west-1"
@@ -75,5 +83,15 @@ run "basic" {
7583
condition = aws_vpc_endpoint.s3[0].vpc_endpoint_type == "Gateway"
7684
error_message = "s3 endpoint should be created"
7785
}
86+
87+
assert {
88+
condition = aws_route53_resolver_rule_association.vpc_associations["rslvr-rr-1234567890"] != null
89+
error_message = "resolver rule association should be created"
90+
}
91+
92+
assert {
93+
condition = aws_route53_resolver_rule_association.vpc_associations["rslvr-rr-1234567890"].resolver_rule_id == "rslvr-rr-1234567890"
94+
error_message = "resolver rule association should have the correct values"
95+
}
7896
}
7997

0 commit comments

Comments
 (0)