Skip to content

Commit d9b69f1

Browse files
committed
add module with tests
1 parent 765be18 commit d9b69f1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resource "local_file" "test" {
2+
filename = "${path.module}/test.txt"
3+
content = "Hello world!"
4+
}

main1.tftest.hcl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
run "test" {
2+
assert {
3+
condition = file(local_file.test.filename) == "Hello world!"
4+
error_message = "Incorrect content in ${local_file.test.filename}."
5+
}
6+
}

0 commit comments

Comments
 (0)