Skip to content

Commit 1131a9b

Browse files
committed
test: adds unit tests for modules
1 parent 0540cca commit 1131a9b

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

tests/unit-tests.tftest.hcl

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Attribute validations for account sub module
2-
run "account_parentId_match" {
3-
command = plan
4-
5-
variables {
6-
name = "some_user_name"
7-
email = "randomPrefix@randomDomain.com"
8-
parent_id = "ou-rndm-parentid"
9-
expected_parent_id = "ou-rndm-parentid"
10-
}
11-
12-
module {
13-
source = "./modules/account/"
14-
}
15-
16-
assert {
17-
condition = aws_organizations_account.member_account.parent_id == var.expected_parent_id
18-
error_message = "Account parent_id mismatch after creation"
19-
}
20-
}
2+
run "account_parentId_match" {
3+
command = plan
4+
5+
variables {
6+
name = "some_user_name"
7+
email = "randomPrefix@randomDomain.com"
8+
parent_id = "ou-rndm-parentid"
9+
expected_parent_id = "ou-rndm-parentid"
10+
}
11+
12+
module {
13+
source = "./modules/account/"
14+
}
15+
16+
assert {
17+
condition = aws_organizations_account.member_account.parent_id == var.expected_parent_id
18+
error_message = "Account parent_id mismatch after creation"
19+
}
20+
}
2121

2222
run "account_name_match" {
2323
command = plan

0 commit comments

Comments
 (0)