Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyucht committed Dec 12, 2024
1 parent 10c456e commit 86b8cce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/providers/pluginfw/tfschema/struct_to_schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,11 @@ func TestStructToSchemaExpectedError(t *testing.T) {
}

func TestComputedField(t *testing.T) {
// Test that ComputedTag field is computed and required
// Test that ComputedTag field is computed
scm := ResourceStructToSchema(context.Background(), TestComputedTfSdk{}, nil)
assert.True(t, scm.Attributes["computedtag"].IsComputed())
assert.True(t, scm.Attributes["computedtag"].IsRequired())
// Computed fields can never be required
assert.False(t, scm.Attributes["computedtag"].IsRequired())

// Test that MultipleTags field is computed and optional
assert.True(t, scm.Attributes["multipletags"].IsComputed())
Expand Down

0 comments on commit 86b8cce

Please sign in to comment.