Skip to content

Commit

Permalink
internal/lang: ephemeralasnull: Add test for unknown values
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Sep 4, 2024
1 parent e312ffc commit 6b8535a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/lang/functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ func TestFunctions(t *testing.T) {
`ephemeralasnull("not ephemeral")`,
cty.StringVal("not ephemeral"),
},
{
`ephemeralasnull(local.unknown)`,
cty.UnknownVal(cty.String),
},
},

"file": {
Expand Down Expand Up @@ -1341,6 +1345,7 @@ func TestFunctions(t *testing.T) {
LocalValues: map[string]cty.Value{
"greeting_template": cty.StringVal("Hello, ${name}!"),
"ephemeral": cty.StringVal("ephemeral").Mark(marks.Ephemeral),
"unknown": cty.UnknownVal(cty.String),
},
}
scope := &Scope{
Expand Down

0 comments on commit 6b8535a

Please sign in to comment.