Skip to content

Commit

Permalink
add test to type_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
aq17 committed Nov 7, 2022
1 parent c90b6a5 commit 90c094b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/codegen/hcl2/model/type_test.go
Expand Up @@ -508,6 +508,8 @@ func TestObjectType(t *testing.T) {
testTraverse(t, typ, hcl.TraverseAttr{Name: "bar"}, IntType, false)
testTraverse(t, typ, hcl.TraverseAttr{Name: "baz"}, NumberType, false)
testTraverse(t, typ, hcl.TraverseAttr{Name: "qux"}, NewOptionalType(BoolType), false)
// test case-insensitive attribute
testTraverse(t, typ, hcl.TraverseAttr{Name: "Qux"}, NewOptionalType(BoolType), true)
testTraverse(t, typ, hcl.TraverseIndex{Key: cty.StringVal("foo")}, BoolType, false)
testTraverse(t, typ, hcl.TraverseIndex{Key: cty.StringVal("bar")}, IntType, false)
testTraverse(t, typ, hcl.TraverseIndex{Key: cty.StringVal("baz")}, NumberType, false)
Expand Down
Expand Up @@ -28,7 +28,7 @@

// Create an IAM role that can be used by our service's task.
resource taskExecRole "aws:iam:Role" {
assumerolepolicy = toJSON({
assumeRolePolicy = toJSON({
Version = "2008-10-17"
Statement = [{
Sid = ""
Expand Down

0 comments on commit 90c094b

Please sign in to comment.