Skip to content

Commit 6866337

Browse files
author
Kilian
committed
fix: ECR unit test with new object wrapper
1 parent f0d938a commit 6866337

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/ecr.tftest.hcl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ run "without_repository" {
1212

1313
variables {
1414
identifier = "abc"
15-
image_uri = ""
15+
image = null
1616
}
1717

1818
assert {
19-
condition = length(aws_ecr_repository.main) == 0
20-
error_message = "ECR repository was created unexpectedly"
19+
condition = length(aws_ecr_repository.main) == 1
20+
error_message = "ECR repository was not created"
2121
}
2222
}
2323

@@ -26,11 +26,13 @@ run "with_repository" {
2626

2727
variables {
2828
identifier = "abc"
29-
image_uri = "test.registry:latest"
29+
image = {
30+
uri = "test.registry:latest"
31+
}
3032
}
3133

3234
assert {
33-
condition = length(aws_ecr_repository.main) == 1
34-
error_message = "ECR repository was not created"
35+
condition = length(aws_ecr_repository.main) == 0
36+
error_message = "ECR repository was created unexpectedly"
3537
}
3638
}

0 commit comments

Comments
 (0)