Skip to content

Commit

Permalink
Add test case with invalid symlink in module
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanck committed Feb 13, 2023
1 parent eb3644b commit 09d74f3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/terraform/parser/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ func TestParseModuleFiles(t *testing.T) {
},
},
},
{
"invalid-links",
map[string]struct{}{
"resources.tf": {},
},
map[string]hcl.Diagnostics{
"resources.tf": nil,
},
},
}

fs := osFs{}
Expand Down
9 changes: 9 additions & 0 deletions internal/terraform/parser/testdata/invalid-links/resources.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
resource "aws_instance" "web" {
ami = "ami-a0cfeed8"
instance_type = "t2.micro"
user_data = file("init-script.sh")

tags = {
Name = random_pet.name.id
}
}

0 comments on commit 09d74f3

Please sign in to comment.