From 86b8cce2870e63d35883125072f185a5ef6e0203 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Thu, 12 Dec 2024 11:59:46 +0100 Subject: [PATCH] fix test --- .../providers/pluginfw/tfschema/struct_to_schema_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/providers/pluginfw/tfschema/struct_to_schema_test.go b/internal/providers/pluginfw/tfschema/struct_to_schema_test.go index 6a410ffce..be22464d6 100644 --- a/internal/providers/pluginfw/tfschema/struct_to_schema_test.go +++ b/internal/providers/pluginfw/tfschema/struct_to_schema_test.go @@ -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())