Skip to content

Commit

Permalink
add module with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yossi-kerner committed Feb 3, 2024
1 parent 765be18 commit d9b69f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "local_file" "test" {
filename = "${path.module}/test.txt"
content = "Hello world!"
}
6 changes: 6 additions & 0 deletions main1.tftest.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
run "test" {
assert {
condition = file(local_file.test.filename) == "Hello world!"
error_message = "Incorrect content in ${local_file.test.filename}."
}
}

0 comments on commit d9b69f1

Please sign in to comment.