Skip to content

Commit

Permalink
validations: add test for disabled origins
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Sep 4, 2023
1 parent c6b9e25 commit b57a5b3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions internal/decoder/validations/unreferenced_origin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,28 @@ func TestUnreferencedOrigins(t *testing.T) {
},
},
},
{
name: "unsupported path origins (module input)",
origins: reference.Origins{
reference.PathOrigin{
Range: hcl.Range{
Filename: "test.tf",
Start: hcl.Pos{},
End: hcl.Pos{},
},
TargetAddr: lang.Address{
lang.RootStep{Name: "var"},
lang.AttrStep{Name: "foo"},
},
TargetPath: lang.Path{
Path: "./submodule",
LanguageID: "terraform",
},
Constraints: reference.OriginConstraints{},
},
},
want: lang.DiagnosticsMap{},
},
{
name: "many undeclared variables",
origins: reference.Origins{
Expand Down

0 comments on commit b57a5b3

Please sign in to comment.