diff --git a/internal/provider/validators/is_cuid_test.go b/internal/provider/validators/is_cuid_test.go index aa0335f8..5916d93e 100644 --- a/internal/provider/validators/is_cuid_test.go +++ b/internal/provider/validators/is_cuid_test.go @@ -1,6 +1,7 @@ package validators_test import ( + "fmt" "testing" "github.com/astronomer/astronomer-terraform-provider/internal/provider/validators" @@ -16,7 +17,7 @@ func TestUnit_Validators_IsCuid(t *testing.T) { expectedIsCuid bool } testCases := []testCase{ - {str: "null", expectedIsCuid: false}, + {str: "null", expectedIsCuid: true}, {str: "unknown", expectedIsCuid: true}, {str: cuid.New(), expectedIsCuid: true}, {str: "abcdef", expectedIsCuid: false}, @@ -39,7 +40,7 @@ func TestUnit_Validators_IsCuid(t *testing.T) { } response := validator.StringResponse{} isCuidValidator.ValidateString(nil, request, &response) - assert.Equal(t, response.Diagnostics.HasError(), !tc.expectedIsCuid) + assert.Equal(t, response.Diagnostics.HasError(), !tc.expectedIsCuid, fmt.Sprintf("test case: %s failed", tc.str)) }) } } diff --git a/internal/utils/list_test.go b/internal/utils/list_test.go index f063eae6..abbc7e48 100644 --- a/internal/utils/list_test.go +++ b/internal/utils/list_test.go @@ -83,7 +83,7 @@ func TestUnit_ObjectList(t *testing.T) { assert.Contains(t, objString, v.Key.ValueString()) assert.Contains(t, objString, v.Value.ValueString()) assert.Contains(t, objString, v.UpdatedAt.ValueString()) - assert.Contains(t, objString, v.IsSecret.ValueBool()) + assert.Contains(t, objString, fmt.Sprintf("%v", v.IsSecret.ValueBool())) } }) }