Skip to content

Commit

Permalink
test for module with data and index
Browse files Browse the repository at this point in the history
  • Loading branch information
drlau committed Aug 18, 2020
1 parent 507f51b commit db13b21
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,18 @@ func TestNewResourceChangeFromComment(t *testing.T) {
UpdateType: ReadResource,
},
},
"handles modules with data and index": {
line: " # module.mymodule.data.mydata.path[0] will be read during apply",
shouldError: false,
expected: &ResourceChange{
Address: "module.mymodule.data.mydata.path[0]",
ModuleAddress: "module.mymodule",
Type: "mydata",
Name: "path",
Index: 0,
UpdateType: ReadResource,
},
},
"handles modules with data and data as the name": {
line: " # module.mymodule.data.data.data will be read during apply",
shouldError: false,
Expand Down

0 comments on commit db13b21

Please sign in to comment.