From f673c18e1c1adc1964fcbb3fc0b4f974088fc500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Cie=C5=9Blak?= Date: Fri, 13 Dec 2024 12:19:04 +0100 Subject: [PATCH 1/3] wip --- .../gen/templates/assertions.tmpl | 12 +++++++++ .../resourceshowoutputassert/gen/model.go | 12 ++++----- .../gen/templates/assertions.tmpl | 27 ++++++++++++++++++- 3 files changed, 44 insertions(+), 7 deletions(-) diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/templates/assertions.tmpl b/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/templates/assertions.tmpl index 929304d2e6..cb6c58afde 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/templates/assertions.tmpl +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/templates/assertions.tmpl @@ -26,3 +26,15 @@ } {{ end -}} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +{{ range .Attributes -}} + func ({{ $assertVar }} *{{ $assertName }}) Has{{ SnakeCaseToCamel .Name }}NotEmpty() *{{ $assertName }} { + {{ $assertVar }}.AddAssertion(assert.ValuePresent("{{ .Name }}")) + return {{ $assertVar }} + } + +{{ end -}} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/model.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/model.go index 1ee193246b..adb50cfa54 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/model.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/model.go @@ -53,18 +53,18 @@ func MapToResourceShowOutputAssertion(field genhelpers.Field) ResourceShowOutput var assertionCreator string switch { case concreteTypeWithoutPtr == "bool": - assertionCreator = "ResourceShowOutputBoolValueSet" + assertionCreator = "ResourceShowOutputBoolValue" case concreteTypeWithoutPtr == "int": - assertionCreator = "ResourceShowOutputIntValueSet" + assertionCreator = "ResourceShowOutputIntValue" case concreteTypeWithoutPtr == "float64": - assertionCreator = "ResourceShowOutputFloatValueSet" + assertionCreator = "ResourceShowOutputFloatValue" case concreteTypeWithoutPtr == "string": - assertionCreator = "ResourceShowOutputValueSet" + assertionCreator = "ResourceShowOutputValue" // TODO [SNOW-1501905]: distinguish between different enum types case strings.HasPrefix(concreteTypeWithoutPtr, "sdk."): - assertionCreator = "ResourceShowOutputStringUnderlyingValueSet" + assertionCreator = "ResourceShowOutputStringUnderlyingValue" default: - assertionCreator = "ResourceShowOutputValueSet" + assertionCreator = "ResourceShowOutputValue" } // TODO [SNOW-1501905]: handle other mappings if needed diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/assertions.tmpl b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/assertions.tmpl index 33c6b3a141..1bd9e5bae7 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/assertions.tmpl +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/assertions.tmpl @@ -3,14 +3,39 @@ {{- $assertName := .Name | printf "%sShowOutputAssert" -}} {{- $nameLowerCase := FirstLetterLowercase .Name -}} {{- $assertVar := FirstLetter $nameLowerCase }} + //////////////////////////// // Attribute value checks // //////////////////////////// {{ range .Attributes -}} func ({{ $assertVar }} *{{ $assertName }}) Has{{ .Name }}(expected {{ .ConcreteType }}) *{{ $assertName }} { - {{ $assertVar }}.AddAssertion(assert.{{ .AssertionCreator }}("{{ SnakeCase .Name }}", {{ RunMapper .Mapper "expected" }})) + {{ $assertVar }}.AddAssertion(assert.{{ .AssertionCreator }}Set("{{ SnakeCase .Name }}", {{ RunMapper .Mapper "expected" }})) return {{ $assertVar }} } {{ end -}} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +{{ range .Attributes -}} + func ({{ $assertVar }} *{{ $assertName }}) HasNo{{ .Name }}() *{{ $assertName }} { + {{ $assertVar }}.AddAssertion(assert.{{ .AssertionCreator }}NotSet("{{ SnakeCase .Name }}")) + return {{ $assertVar }} + } + +{{ end -}} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +{{ range .Attributes -}} + func ({{ $assertVar }} *{{ $assertName }}) Has{{ .Name }}NotEmpty() *{{ $assertName }} { + {{ $assertVar }}.AddAssertion(assert.{{ .AssertionCreator }}Present("{{ SnakeCase .Name }}")) + return {{ $assertVar }} + } + +{{ end -}} From b2fc16341f83da55838725f62928b869def73058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Cie=C5=9Blak?= Date: Fri, 13 Dec 2024 16:02:33 +0100 Subject: [PATCH 2/3] wip --- .../assert/resource_assertions.go | 58 ---------------- .../assert/resource_parameter_assertions.go | 66 ++++++++++++++++++ .../assert/resource_show_assertions.go | 67 +++++++++++++++++++ .../assert/resourceassert/gen/model.go | 2 +- .../gen/templates/assertions.tmpl | 27 ++++++-- .../resourceshowoutputassert/gen/model.go | 28 ++++++-- .../gen/templates/assertions.tmpl | 22 +++++- .../gen/templates/definition.tmpl | 2 +- pkg/internal/genhelpers/mappers.go | 1 + .../genhelpers/struct_details_extractor.go | 1 + 10 files changed, 203 insertions(+), 71 deletions(-) create mode 100644 pkg/acceptance/bettertestspoc/assert/resource_parameter_assertions.go create mode 100644 pkg/acceptance/bettertestspoc/assert/resource_show_assertions.go diff --git a/pkg/acceptance/bettertestspoc/assert/resource_assertions.go b/pkg/acceptance/bettertestspoc/assert/resource_assertions.go index 09c8c875cc..026f90e770 100644 --- a/pkg/acceptance/bettertestspoc/assert/resource_assertions.go +++ b/pkg/acceptance/bettertestspoc/assert/resource_assertions.go @@ -3,12 +3,10 @@ package assert import ( "errors" "fmt" - "strconv" "strings" "testing" "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/importchecks" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" ) @@ -92,62 +90,6 @@ func ValueNotSet(fieldName string) ResourceAssertion { return ResourceAssertion{fieldName: fieldName, resourceAssertionType: resourceAssertionTypeValueNotSet} } -const showOutputPrefix = "show_output.0." - -func ResourceShowOutputBoolValueSet(fieldName string, expected bool) ResourceAssertion { - return ResourceShowOutputValueSet(fieldName, strconv.FormatBool(expected)) -} - -func ResourceShowOutputIntValueSet(fieldName string, expected int) ResourceAssertion { - return ResourceShowOutputValueSet(fieldName, strconv.Itoa(expected)) -} - -func ResourceShowOutputFloatValueSet(fieldName string, expected float64) ResourceAssertion { - return ResourceShowOutputValueSet(fieldName, strconv.FormatFloat(expected, 'f', -1, 64)) -} - -func ResourceShowOutputStringUnderlyingValueSet[U ~string](fieldName string, expected U) ResourceAssertion { - return ResourceShowOutputValueSet(fieldName, string(expected)) -} - -func ResourceShowOutputValueSet(fieldName string, expected string) ResourceAssertion { - return ResourceAssertion{fieldName: showOutputPrefix + fieldName, expectedValue: expected, resourceAssertionType: resourceAssertionTypeValueSet} -} - -func ResourceShowOutputValueNotSet(fieldName string) ResourceAssertion { - return ResourceAssertion{fieldName: showOutputPrefix + fieldName, resourceAssertionType: resourceAssertionTypeValueNotSet} -} - -func ResourceShowOutputValuePresent(fieldName string) ResourceAssertion { - return ResourceAssertion{fieldName: showOutputPrefix + fieldName, resourceAssertionType: resourceAssertionTypeValuePresent} -} - -const ( - parametersPrefix = "parameters.0." - parametersValueSuffix = ".0.value" - parametersLevelSuffix = ".0.level" -) - -func ResourceParameterBoolValueSet[T ~string](parameterName T, expected bool) ResourceAssertion { - return ResourceParameterValueSet(parameterName, strconv.FormatBool(expected)) -} - -func ResourceParameterIntValueSet[T ~string](parameterName T, expected int) ResourceAssertion { - return ResourceParameterValueSet(parameterName, strconv.Itoa(expected)) -} - -func ResourceParameterStringUnderlyingValueSet[T ~string, U ~string](parameterName T, expected U) ResourceAssertion { - return ResourceParameterValueSet(parameterName, string(expected)) -} - -func ResourceParameterValueSet[T ~string](parameterName T, expected string) ResourceAssertion { - return ResourceAssertion{fieldName: parametersPrefix + strings.ToLower(string(parameterName)) + parametersValueSuffix, expectedValue: expected, resourceAssertionType: resourceAssertionTypeValueSet} -} - -func ResourceParameterLevelSet[T ~string](parameterName T, parameterType sdk.ParameterType) ResourceAssertion { - return ResourceAssertion{fieldName: parametersPrefix + strings.ToLower(string(parameterName)) + parametersLevelSuffix, expectedValue: string(parameterType), resourceAssertionType: resourceAssertionTypeValueSet} -} - // ToTerraformTestCheckFunc implements TestCheckFuncProvider to allow easier creation of new resource assertions. // It goes through all the assertion accumulated earlier and gathers the results of the checks. func (r *ResourceAssert) ToTerraformTestCheckFunc(t *testing.T) resource.TestCheckFunc { diff --git a/pkg/acceptance/bettertestspoc/assert/resource_parameter_assertions.go b/pkg/acceptance/bettertestspoc/assert/resource_parameter_assertions.go new file mode 100644 index 0000000000..6a95a61123 --- /dev/null +++ b/pkg/acceptance/bettertestspoc/assert/resource_parameter_assertions.go @@ -0,0 +1,66 @@ +package assert + +import ( + "strconv" + "strings" + + "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk" +) + +const ( + parametersPrefix = "parameters.0." + parametersValueSuffix = ".0.value" + parametersLevelSuffix = ".0.level" +) + +func ResourceParameterBoolValueSet[T ~string](parameterName T, expected bool) ResourceAssertion { + return ResourceParameterValueSet(parameterName, strconv.FormatBool(expected)) +} + +func ResourceParameterBoolValueNotSet[T ~string](parameterName T) ResourceAssertion { + return ResourceParameterValueNotSet(parameterName) +} + +func ResourceParameterBoolValuePresent[T ~string](parameterName T) ResourceAssertion { + return ResourceParameterValuePresent(parameterName) +} + +func ResourceParameterIntValueSet[T ~string](parameterName T, expected int) ResourceAssertion { + return ResourceParameterValueSet(parameterName, strconv.Itoa(expected)) +} + +func ResourceParameterIntValueNotSet[T ~string](parameterName T) ResourceAssertion { + return ResourceParameterValueNotSet(parameterName) +} + +func ResourceParameterIntValuePresent[T ~string](parameterName T) ResourceAssertion { + return ResourceParameterValuePresent(parameterName) +} + +func ResourceParameterStringUnderlyingValueSet[T ~string, U ~string](parameterName T, expected U) ResourceAssertion { + return ResourceParameterValueSet(parameterName, string(expected)) +} + +func ResourceParameterStringUnderlyingValueNotSet[T ~string](parameterName T) ResourceAssertion { + return ResourceParameterValueNotSet(parameterName) +} + +func ResourceParameterStringUnderlyingValuePresent[T ~string](parameterName T) ResourceAssertion { + return ResourceParameterValuePresent(parameterName) +} + +func ResourceParameterValueSet[T ~string](parameterName T, expected string) ResourceAssertion { + return ResourceAssertion{fieldName: parametersPrefix + strings.ToLower(string(parameterName)) + parametersValueSuffix, expectedValue: expected, resourceAssertionType: resourceAssertionTypeValueSet} +} + +func ResourceParameterValueNotSet[T ~string](parameterName T) ResourceAssertion { + return ResourceAssertion{fieldName: parametersPrefix + strings.ToLower(string(parameterName)) + parametersValueSuffix, resourceAssertionType: resourceAssertionTypeValueNotSet} +} + +func ResourceParameterValuePresent[T ~string](parameterName T) ResourceAssertion { + return ResourceAssertion{fieldName: parametersPrefix + strings.ToLower(string(parameterName)) + parametersValueSuffix, resourceAssertionType: resourceAssertionTypeValuePresent} +} + +func ResourceParameterLevelSet[T ~string](parameterName T, parameterType sdk.ParameterType) ResourceAssertion { + return ResourceAssertion{fieldName: parametersPrefix + strings.ToLower(string(parameterName)) + parametersLevelSuffix, expectedValue: string(parameterType), resourceAssertionType: resourceAssertionTypeValueSet} +} diff --git a/pkg/acceptance/bettertestspoc/assert/resource_show_assertions.go b/pkg/acceptance/bettertestspoc/assert/resource_show_assertions.go new file mode 100644 index 0000000000..cecce36f91 --- /dev/null +++ b/pkg/acceptance/bettertestspoc/assert/resource_show_assertions.go @@ -0,0 +1,67 @@ +package assert + +import ( + "strconv" +) + +const showOutputPrefix = "show_output.0." + +func ResourceShowOutputBoolValueSet(fieldName string, expected bool) ResourceAssertion { + return ResourceShowOutputValueSet(fieldName, strconv.FormatBool(expected)) +} + +func ResourceShowOutputBoolValueNotSet(fieldName string) ResourceAssertion { + return ResourceShowOutputValueNotSet(fieldName) +} + +func ResourceShowOutputBoolValuePresent(fieldName string) ResourceAssertion { + return ResourceShowOutputValuePresent(fieldName) +} + +func ResourceShowOutputIntValueSet(fieldName string, expected int) ResourceAssertion { + return ResourceShowOutputValueSet(fieldName, strconv.Itoa(expected)) +} + +func ResourceShowOutputIntValueNotSet(fieldName string) ResourceAssertion { + return ResourceShowOutputValueNotSet(fieldName) +} + +func ResourceShowOutputIntValuePresent(fieldName string) ResourceAssertion { + return ResourceShowOutputValuePresent(fieldName) +} + +func ResourceShowOutputFloatValueSet(fieldName string, expected float64) ResourceAssertion { + return ResourceShowOutputValueSet(fieldName, strconv.FormatFloat(expected, 'f', -1, 64)) +} + +func ResourceShowOutputFloatValueNotSet(fieldName string) ResourceAssertion { + return ResourceShowOutputValueNotSet(fieldName) +} + +func ResourceShowOutputFloatValuePresent(fieldName string) ResourceAssertion { + return ResourceShowOutputValuePresent(fieldName) +} + +func ResourceShowOutputStringUnderlyingValueSet[U ~string](fieldName string, expected U) ResourceAssertion { + return ResourceShowOutputValueSet(fieldName, string(expected)) +} + +func ResourceShowOutputStringUnderlyingValueNotSet(fieldName string) ResourceAssertion { + return ResourceShowOutputValueNotSet(fieldName) +} + +func ResourceShowOutputStringUnderlyingValuePresent(fieldName string) ResourceAssertion { + return ResourceShowOutputValuePresent(fieldName) +} + +func ResourceShowOutputValueSet(fieldName string, expected string) ResourceAssertion { + return ResourceAssertion{fieldName: showOutputPrefix + fieldName, expectedValue: expected, resourceAssertionType: resourceAssertionTypeValueSet} +} + +func ResourceShowOutputValueNotSet(fieldName string) ResourceAssertion { + return ResourceAssertion{fieldName: showOutputPrefix + fieldName, resourceAssertionType: resourceAssertionTypeValueNotSet} +} + +func ResourceShowOutputValuePresent(fieldName string) ResourceAssertion { + return ResourceAssertion{fieldName: showOutputPrefix + fieldName, resourceAssertionType: resourceAssertionTypeValuePresent} +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/model.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/model.go index 47bab21d60..6f7f53bc26 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/model.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/model.go @@ -37,7 +37,7 @@ func ModelFromResourceSchemaDetails(resourceSchemaDetails genhelpers.ResourceSch attributes = append(attributes, ResourceAttributeAssertionModel{ Name: attr.Name, // TODO [SNOW-1501905]: add attribute type logic; allow type safe assertions, not only strings - AttributeType: "string", + AttributeType: attr.AttributeType.String(), }) } diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/templates/assertions.tmpl b/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/templates/assertions.tmpl index cb6c58afde..278f4d62ca 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/templates/assertions.tmpl +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/gen/templates/assertions.tmpl @@ -15,15 +15,34 @@ {{ end -}} +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +{{ range .Attributes -}} + func ({{ $assertVar }} *{{ $assertName }}) HasNo{{ SnakeCaseToCamel .Name }}() *{{ $assertName }} { + {{ if or (eq .AttributeType "TypeList") (eq .AttributeType "TypeSet") -}} + {{ $assertVar }}.AddAssertion(assert.ValueSet("{{ .Name }}.#", "0")) + return {{ $assertVar }} + {{ else -}} + {{ $assertVar }}.AddAssertion(assert.ValueNotSet("{{ .Name }}")) + return {{ $assertVar }} + {{ end -}} + } + +{{ end -}} + //////////////////////////// // Attribute empty checks // //////////////////////////// {{ range .Attributes -}} - func ({{ $assertVar }} *{{ $assertName }}) HasNo{{ SnakeCaseToCamel .Name }}() *{{ $assertName }} { - {{ $assertVar }}.AddAssertion(assert.ValueNotSet("{{ .Name }}")) - return {{ $assertVar }} - } + {{ if eq .AttributeType "TypeString" -}} + func ({{ $assertVar }} *{{ $assertName }}) Has{{ SnakeCaseToCamel .Name }}Empty() *{{ $assertName }} { + {{ $assertVar }}.AddAssertion(assert.ValueSet("{{ .Name }}", "")) + return {{ $assertVar }} + } + {{ end -}} {{ end -}} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/model.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/model.go index adb50cfa54..6f4df8322b 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/model.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/model.go @@ -31,23 +31,35 @@ type ResourceShowOutputAssertionModel struct { func ModelFromSdkObjectDetails(sdkObject genhelpers.SdkObjectDetails) ResourceShowOutputAssertionsModel { attributes := make([]ResourceShowOutputAssertionModel, len(sdkObject.Fields)) + includeFmt := false for idx, field := range sdkObject.Fields { - attributes[idx] = MapToResourceShowOutputAssertion(field) + showOutputAssertions, inFmt := MapToResourceShowOutputAssertion(field) + if !includeFmt && inFmt { + includeFmt = true + } + attributes[idx] = showOutputAssertions } name, _ := strings.CutPrefix(sdkObject.Name, "sdk.") packageWithGenerateDirective := os.Getenv("GOPACKAGE") + imports := genhelpers.AdditionalStandardImports(sdkObject.Fields) + if includeFmt { + imports = append(imports, "fmt") + } return ResourceShowOutputAssertionsModel{ Name: name, Attributes: attributes, PreambleModel: PreambleModel{ PackageName: packageWithGenerateDirective, - AdditionalStandardImports: genhelpers.AdditionalStandardImports(sdkObject.Fields), + AdditionalStandardImports: imports, }, } } -func MapToResourceShowOutputAssertion(field genhelpers.Field) ResourceShowOutputAssertionModel { +func MapToResourceShowOutputAssertion(field genhelpers.Field) (ResourceShowOutputAssertionModel, bool) { // TODO: Temporary + isPrimitive := true + includeFmt := false + concreteTypeWithoutPtr, _ := strings.CutPrefix(field.ConcreteType, "*") // TODO [SNOW-1501905]: get a runtime name for the assertion creator var assertionCreator string @@ -65,6 +77,7 @@ func MapToResourceShowOutputAssertion(field genhelpers.Field) ResourceShowOutput assertionCreator = "ResourceShowOutputStringUnderlyingValue" default: assertionCreator = "ResourceShowOutputValue" + isPrimitive = false } // TODO [SNOW-1501905]: handle other mappings if needed @@ -72,8 +85,15 @@ func MapToResourceShowOutputAssertion(field genhelpers.Field) ResourceShowOutput switch concreteTypeWithoutPtr { case "sdk.AccountObjectIdentifier": mapper = genhelpers.Name + case "sdk.AccountIdentifier", "sdk.DatabaseObjectIdentifier", "sdk.SchemaObjectIdentifier", "sdk.SchemaObjectIdentifierWithArguments", "sdk.ExternalObjectIdentifier": + mapper = genhelpers.FullyQualifiedName case "time.Time": mapper = genhelpers.ToString + default: + if !isPrimitive { + mapper = genhelpers.PrintToString + includeFmt = true + } } return ResourceShowOutputAssertionModel{ @@ -81,5 +101,5 @@ func MapToResourceShowOutputAssertion(field genhelpers.Field) ResourceShowOutput ConcreteType: concreteTypeWithoutPtr, AssertionCreator: assertionCreator, Mapper: mapper, - } + }, includeFmt } diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/assertions.tmpl b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/assertions.tmpl index 1bd9e5bae7..4d3fb4da9a 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/assertions.tmpl +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/assertions.tmpl @@ -9,6 +9,7 @@ //////////////////////////// {{ range .Attributes -}} + {{/* TODO: jeśli nie znasz typu -> defaultuj do stringa */}} func ({{ $assertVar }} *{{ $assertName }}) Has{{ .Name }}(expected {{ .ConcreteType }}) *{{ $assertName }} { {{ $assertVar }}.AddAssertion(assert.{{ .AssertionCreator }}Set("{{ SnakeCase .Name }}", {{ RunMapper .Mapper "expected" }})) return {{ $assertVar }} @@ -16,9 +17,9 @@ {{ end -}} -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// {{ range .Attributes -}} func ({{ $assertVar }} *{{ $assertName }}) HasNo{{ .Name }}() *{{ $assertName }} { @@ -28,6 +29,21 @@ {{ end -}} +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +{{ range .Attributes -}} + + {{ if eq .ConcreteType "string" -}} + func ({{ $assertVar }} *{{ $assertName }}) Has{{ .Name }}Empty() *{{ $assertName }} { + {{ $assertVar }}.AddAssertion(assert.{{ .AssertionCreator }}Set("{{ SnakeCase .Name }}", "")) + return {{ $assertVar }} + } + {{ end }} + +{{ end -}} + /////////////////////////////// // Attribute presence checks // /////////////////////////////// diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/definition.tmpl b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/definition.tmpl index 62df9799b9..b2751da61c 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/definition.tmpl +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/gen/templates/definition.tmpl @@ -2,7 +2,7 @@ {{- $assertName := .Name | printf "%sShowOutputAssert" -}} {{- $nameLowerCase := FirstLetterLowercase .Name -}} -{{- $assertVar := FirstLetter $nameLowerCase }} +{{- $assertVar := FirstLetterLowercase .Name | printf "%sAssert" }} type {{ $assertName }} struct { *assert.ResourceAssert } diff --git a/pkg/internal/genhelpers/mappers.go b/pkg/internal/genhelpers/mappers.go index 53f86e5521..be7f38516d 100644 --- a/pkg/internal/genhelpers/mappers.go +++ b/pkg/internal/genhelpers/mappers.go @@ -5,6 +5,7 @@ import "fmt" type Mapper func(string) string var ( + PrintToString = func(field string) string { return fmt.Sprintf(`fmt.Sprintf("%%v", %s)`, field) } Identity = func(field string) string { return field } ToString = func(field string) string { return fmt.Sprintf("%s.String()", field) } FullyQualifiedName = func(field string) string { return fmt.Sprintf("%s.FullyQualifiedName()", field) } diff --git a/pkg/internal/genhelpers/struct_details_extractor.go b/pkg/internal/genhelpers/struct_details_extractor.go index 0b4baf2608..4e5cbdcce7 100644 --- a/pkg/internal/genhelpers/struct_details_extractor.go +++ b/pkg/internal/genhelpers/struct_details_extractor.go @@ -83,6 +83,7 @@ func AdditionalStandardImports(fields []Field) []string { } additionalImports := make([]string, 0) for k := range imports { + k, _ := strings.CutPrefix(k, "[]") if !slices.Contains([]string{"sdk"}, k) { additionalImports = append(additionalImports, k) } From 53a5058de2ca863dbf9255bc4f07d796f9e795b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Cie=C5=9Blak?= Date: Fri, 13 Dec 2024 16:03:21 +0100 Subject: [PATCH 3/3] wip --- .../account_parameter_resource_gen.go | 33 +- .../resourceassert/account_resource_gen.go | 155 ++++- .../resourceassert/database_resource_gen.go | 167 ++++- .../database_role_resource_gen.go | 51 +- .../function_java_resource_gen.go | 214 ++++++- .../function_javascript_resource_gen.go | 159 ++++- .../function_python_resource_gen.go | 216 ++++++- .../function_scala_resource_gen.go | 214 ++++++- .../function_sql_resource_gen.go | 160 ++++- .../legacy_service_user_resource_gen.go | 559 +++++++++++++++- .../masking_policy_resource_gen.go | 94 ++- ...gration_for_custom_clients_resource_gen.go | 166 ++++- ...n_for_partner_applications_resource_gen.go | 106 +++- .../primary_connection_resource_ext.go | 5 - .../primary_connection_resource_gen.go | 66 +- .../procedure_java_resource_gen.go | 215 ++++++- .../procedure_javascript_resource_gen.go | 153 ++++- .../procedure_python_resource_gen.go | 208 +++++- .../procedure_scala_resource_gen.go | 215 ++++++- .../procedure_sql_resource_gen.go | 153 ++++- .../resource_monitor_resource_ext.go | 10 - .../resource_monitor_resource_gen.go | 89 ++- .../row_access_policy_resource_gen.go | 76 ++- .../resourceassert/schema_resource_gen.go | 182 +++++- .../secondary_connection_resource_gen.go | 56 +- ...h_authorization_code_grant_resource_ext.go | 10 - ...h_authorization_code_grant_resource_gen.go | 96 ++- ..._with_basic_authentication_resource_gen.go | 87 ++- ...et_with_client_credentials_resource_gen.go | 85 ++- ...secret_with_generic_string_resource_gen.go | 78 ++- .../service_user_resource_gen.go | 541 +++++++++++++++- .../stream_on_directory_table_resource_gen.go | 97 ++- .../stream_on_external_table_resource_gen.go | 120 +++- .../stream_on_table_resource_gen.go | 129 +++- .../stream_on_view_resource_gen.go | 129 +++- .../tag_association_resource_gen.go | 64 +- .../assert/resourceassert/tag_resource_gen.go | 74 ++- .../resourceassert/task_resource_gen.go | 528 ++++++++++++++- .../resourceassert/user_resource_gen.go | 600 +++++++++++++++++- .../resourceassert/view_resource_gen.go | 145 ++++- .../resourceassert/warehouse_resource_gen.go | 136 +++- .../account_show_output_ext.go | 102 +-- .../account_show_output_gen.go | 391 +++++++++++- .../authentication_policy_show_output_gen.go | 144 ++++- .../connection_show_output_ext.go | 7 +- .../connection_show_output_gen.go | 195 +++++- .../database_role_show_output_gen.go | 174 ++++- .../database_show_output_gen.go | 299 +++++++++ .../external_volume_show_output_gen.go | 68 +- .../function_show_output_gen.go | 286 ++++++++- .../masking_policy_show_output_ext.go | 5 - .../masking_policy_show_output_gen.go | 149 ++++- .../procedure_show_output_gen.go | 241 ++++++- .../resource_monitor_show_output_ext.go | 20 - .../resource_monitor_show_output_gen.go | 210 +++++- .../row_access_policy_show_output_ext.go | 5 - .../row_access_policy_show_output_gen.go | 159 ++++- .../secret_show_output_gen.go | 155 ++++- .../stream_show_output_ext.go | 12 +- .../stream_show_output_gen.go | 229 ++++++- .../tag_show_output_ext.go | 20 - .../tag_show_output_gen.go | 140 +++- .../task_show_output_ext.go | 34 +- .../task_show_output_gen.go | 330 +++++++++- .../user_show_output_ext.go | 25 - .../user_show_output_gen.go | 389 +++++++++++- .../view_show_output_gen.go | 209 +++++- .../warehouse_show_output_gen.go | 314 ++++++++- .../connections_acceptance_test.go | 4 +- pkg/datasources/streams_acceptance_test.go | 22 +- pkg/datasources/tasks_acceptance_test.go | 4 +- .../external_volume_acceptance_test.go | 106 ++-- .../function_javascript_acceptance_test.go | 4 +- pkg/resources/function_sql_acceptance_test.go | 2 +- .../primary_connection_acceptance_test.go | 12 +- .../secondary_connection_acceptance_test.go | 2 +- ...ream_on_directory_table_acceptance_test.go | 8 +- ...tream_on_external_table_acceptance_test.go | 28 +- .../stream_on_table_acceptance_test.go | 24 +- .../stream_on_view_acceptance_test.go | 24 +- pkg/resources/task_acceptance_test.go | 86 +-- 81 files changed, 10523 insertions(+), 756 deletions(-) delete mode 100644 pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_authorization_code_grant_resource_ext.go create mode 100644 pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/database_show_output_gen.go delete mode 100644 pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/user_show_output_ext.go diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/account_parameter_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/account_parameter_resource_gen.go index a021e54a07..950015cef6 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/account_parameter_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/account_parameter_resource_gen.go @@ -42,9 +42,9 @@ func (a *AccountParameterResourceAssert) HasValueString(expected string) *Accoun return a } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (a *AccountParameterResourceAssert) HasNoKey() *AccountParameterResourceAssert { a.AddAssertion(assert.ValueNotSet("key")) @@ -55,3 +55,30 @@ func (a *AccountParameterResourceAssert) HasNoValue() *AccountParameterResourceA a.AddAssertion(assert.ValueNotSet("value")) return a } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (a *AccountParameterResourceAssert) HasKeyEmpty() *AccountParameterResourceAssert { + a.AddAssertion(assert.ValueSet("key", "")) + return a +} +func (a *AccountParameterResourceAssert) HasValueEmpty() *AccountParameterResourceAssert { + a.AddAssertion(assert.ValueSet("value", "")) + return a +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (a *AccountParameterResourceAssert) HasKeyNotEmpty() *AccountParameterResourceAssert { + a.AddAssertion(assert.ValuePresent("key")) + return a +} + +func (a *AccountParameterResourceAssert) HasValueNotEmpty() *AccountParameterResourceAssert { + a.AddAssertion(assert.ValuePresent("value")) + return a +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/account_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/account_resource_gen.go index 5d6f9d2d0a..54d8345272 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/account_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/account_resource_gen.go @@ -112,9 +112,9 @@ func (a *AccountResourceAssert) HasRegionGroupString(expected string) *AccountRe return a } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (a *AccountResourceAssert) HasNoAdminName() *AccountResourceAssert { a.AddAssertion(assert.ValueNotSet("admin_name")) @@ -195,3 +195,152 @@ func (a *AccountResourceAssert) HasNoRegionGroup() *AccountResourceAssert { a.AddAssertion(assert.ValueNotSet("region_group")) return a } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (a *AccountResourceAssert) HasAdminNameEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("admin_name", "")) + return a +} +func (a *AccountResourceAssert) HasAdminPasswordEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("admin_password", "")) + return a +} +func (a *AccountResourceAssert) HasAdminRsaPublicKeyEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("admin_rsa_public_key", "")) + return a +} +func (a *AccountResourceAssert) HasAdminUserTypeEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("admin_user_type", "")) + return a +} +func (a *AccountResourceAssert) HasCommentEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("comment", "")) + return a +} +func (a *AccountResourceAssert) HasEditionEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("edition", "")) + return a +} +func (a *AccountResourceAssert) HasEmailEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("email", "")) + return a +} +func (a *AccountResourceAssert) HasFirstNameEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("first_name", "")) + return a +} +func (a *AccountResourceAssert) HasFullyQualifiedNameEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return a +} +func (a *AccountResourceAssert) HasIsOrgAdminEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("is_org_admin", "")) + return a +} +func (a *AccountResourceAssert) HasLastNameEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("last_name", "")) + return a +} +func (a *AccountResourceAssert) HasMustChangePasswordEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("must_change_password", "")) + return a +} +func (a *AccountResourceAssert) HasNameEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("name", "")) + return a +} +func (a *AccountResourceAssert) HasRegionEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("region", "")) + return a +} +func (a *AccountResourceAssert) HasRegionGroupEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValueSet("region_group", "")) + return a +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (a *AccountResourceAssert) HasAdminNameNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("admin_name")) + return a +} + +func (a *AccountResourceAssert) HasAdminPasswordNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("admin_password")) + return a +} + +func (a *AccountResourceAssert) HasAdminRsaPublicKeyNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("admin_rsa_public_key")) + return a +} + +func (a *AccountResourceAssert) HasAdminUserTypeNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("admin_user_type")) + return a +} + +func (a *AccountResourceAssert) HasCommentNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("comment")) + return a +} + +func (a *AccountResourceAssert) HasEditionNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("edition")) + return a +} + +func (a *AccountResourceAssert) HasEmailNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("email")) + return a +} + +func (a *AccountResourceAssert) HasFirstNameNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("first_name")) + return a +} + +func (a *AccountResourceAssert) HasFullyQualifiedNameNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return a +} + +func (a *AccountResourceAssert) HasGracePeriodInDaysNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("grace_period_in_days")) + return a +} + +func (a *AccountResourceAssert) HasIsOrgAdminNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("is_org_admin")) + return a +} + +func (a *AccountResourceAssert) HasLastNameNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("last_name")) + return a +} + +func (a *AccountResourceAssert) HasMustChangePasswordNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("must_change_password")) + return a +} + +func (a *AccountResourceAssert) HasNameNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("name")) + return a +} + +func (a *AccountResourceAssert) HasRegionNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("region")) + return a +} + +func (a *AccountResourceAssert) HasRegionGroupNotEmpty() *AccountResourceAssert { + a.AddAssertion(assert.ValuePresent("region_group")) + return a +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/database_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/database_resource_gen.go index 4c3536308d..2fa9f331b3 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/database_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/database_resource_gen.go @@ -142,9 +142,9 @@ func (d *DatabaseResourceAssert) HasUserTaskTimeoutMsString(expected string) *Da return d } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (d *DatabaseResourceAssert) HasNoCatalog() *DatabaseResourceAssert { d.AddAssertion(assert.ValueNotSet("catalog")) @@ -217,7 +217,7 @@ func (d *DatabaseResourceAssert) HasNoReplaceInvalidCharacters() *DatabaseResour } func (d *DatabaseResourceAssert) HasNoReplication() *DatabaseResourceAssert { - d.AddAssertion(assert.ValueNotSet("replication")) + d.AddAssertion(assert.ValueSet("replication.#", "0")) return d } @@ -255,3 +255,162 @@ func (d *DatabaseResourceAssert) HasNoUserTaskTimeoutMs() *DatabaseResourceAsser d.AddAssertion(assert.ValueNotSet("user_task_timeout_ms")) return d } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (d *DatabaseResourceAssert) HasCatalogEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValueSet("catalog", "")) + return d +} +func (d *DatabaseResourceAssert) HasCommentEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValueSet("comment", "")) + return d +} +func (d *DatabaseResourceAssert) HasDefaultDdlCollationEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValueSet("default_ddl_collation", "")) + return d +} +func (d *DatabaseResourceAssert) HasExternalVolumeEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValueSet("external_volume", "")) + return d +} +func (d *DatabaseResourceAssert) HasFullyQualifiedNameEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return d +} +func (d *DatabaseResourceAssert) HasLogLevelEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValueSet("log_level", "")) + return d +} +func (d *DatabaseResourceAssert) HasNameEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValueSet("name", "")) + return d +} +func (d *DatabaseResourceAssert) HasStorageSerializationPolicyEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValueSet("storage_serialization_policy", "")) + return d +} +func (d *DatabaseResourceAssert) HasTraceLevelEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValueSet("trace_level", "")) + return d +} +func (d *DatabaseResourceAssert) HasUserTaskManagedInitialWarehouseSizeEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValueSet("user_task_managed_initial_warehouse_size", "")) + return d +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (d *DatabaseResourceAssert) HasCatalogNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("catalog")) + return d +} + +func (d *DatabaseResourceAssert) HasCommentNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("comment")) + return d +} + +func (d *DatabaseResourceAssert) HasDataRetentionTimeInDaysNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("data_retention_time_in_days")) + return d +} + +func (d *DatabaseResourceAssert) HasDefaultDdlCollationNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("default_ddl_collation")) + return d +} + +func (d *DatabaseResourceAssert) HasDropPublicSchemaOnCreationNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("drop_public_schema_on_creation")) + return d +} + +func (d *DatabaseResourceAssert) HasEnableConsoleOutputNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("enable_console_output")) + return d +} + +func (d *DatabaseResourceAssert) HasExternalVolumeNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("external_volume")) + return d +} + +func (d *DatabaseResourceAssert) HasFullyQualifiedNameNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return d +} + +func (d *DatabaseResourceAssert) HasIsTransientNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("is_transient")) + return d +} + +func (d *DatabaseResourceAssert) HasLogLevelNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("log_level")) + return d +} + +func (d *DatabaseResourceAssert) HasMaxDataExtensionTimeInDaysNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("max_data_extension_time_in_days")) + return d +} + +func (d *DatabaseResourceAssert) HasNameNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("name")) + return d +} + +func (d *DatabaseResourceAssert) HasQuotedIdentifiersIgnoreCaseNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("quoted_identifiers_ignore_case")) + return d +} + +func (d *DatabaseResourceAssert) HasReplaceInvalidCharactersNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("replace_invalid_characters")) + return d +} + +func (d *DatabaseResourceAssert) HasReplicationNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("replication")) + return d +} + +func (d *DatabaseResourceAssert) HasStorageSerializationPolicyNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("storage_serialization_policy")) + return d +} + +func (d *DatabaseResourceAssert) HasSuspendTaskAfterNumFailuresNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("suspend_task_after_num_failures")) + return d +} + +func (d *DatabaseResourceAssert) HasTaskAutoRetryAttemptsNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("task_auto_retry_attempts")) + return d +} + +func (d *DatabaseResourceAssert) HasTraceLevelNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("trace_level")) + return d +} + +func (d *DatabaseResourceAssert) HasUserTaskManagedInitialWarehouseSizeNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("user_task_managed_initial_warehouse_size")) + return d +} + +func (d *DatabaseResourceAssert) HasUserTaskMinimumTriggerIntervalInSecondsNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("user_task_minimum_trigger_interval_in_seconds")) + return d +} + +func (d *DatabaseResourceAssert) HasUserTaskTimeoutMsNotEmpty() *DatabaseResourceAssert { + d.AddAssertion(assert.ValuePresent("user_task_timeout_ms")) + return d +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/database_role_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/database_role_resource_gen.go index 09887b7326..0c4dd6477f 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/database_role_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/database_role_resource_gen.go @@ -52,9 +52,9 @@ func (d *DatabaseRoleResourceAssert) HasNameString(expected string) *DatabaseRol return d } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (d *DatabaseRoleResourceAssert) HasNoComment() *DatabaseRoleResourceAssert { d.AddAssertion(assert.ValueNotSet("comment")) @@ -75,3 +75,48 @@ func (d *DatabaseRoleResourceAssert) HasNoName() *DatabaseRoleResourceAssert { d.AddAssertion(assert.ValueNotSet("name")) return d } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (d *DatabaseRoleResourceAssert) HasCommentEmpty() *DatabaseRoleResourceAssert { + d.AddAssertion(assert.ValueSet("comment", "")) + return d +} +func (d *DatabaseRoleResourceAssert) HasDatabaseEmpty() *DatabaseRoleResourceAssert { + d.AddAssertion(assert.ValueSet("database", "")) + return d +} +func (d *DatabaseRoleResourceAssert) HasFullyQualifiedNameEmpty() *DatabaseRoleResourceAssert { + d.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return d +} +func (d *DatabaseRoleResourceAssert) HasNameEmpty() *DatabaseRoleResourceAssert { + d.AddAssertion(assert.ValueSet("name", "")) + return d +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (d *DatabaseRoleResourceAssert) HasCommentNotEmpty() *DatabaseRoleResourceAssert { + d.AddAssertion(assert.ValuePresent("comment")) + return d +} + +func (d *DatabaseRoleResourceAssert) HasDatabaseNotEmpty() *DatabaseRoleResourceAssert { + d.AddAssertion(assert.ValuePresent("database")) + return d +} + +func (d *DatabaseRoleResourceAssert) HasFullyQualifiedNameNotEmpty() *DatabaseRoleResourceAssert { + d.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return d +} + +func (d *DatabaseRoleResourceAssert) HasNameNotEmpty() *DatabaseRoleResourceAssert { + d.AddAssertion(assert.ValuePresent("name")) + return d +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/function_java_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/function_java_resource_gen.go index 089d621565..301c6dde3a 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/function_java_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/function_java_resource_gen.go @@ -112,8 +112,8 @@ func (f *FunctionJavaResourceAssert) HasPackagesString(expected string) *Functio return f } -func (f *FunctionJavaResourceAssert) HasReturnBehaviorString(expected string) *FunctionJavaResourceAssert { - f.AddAssertion(assert.ValueSet("return_behavior", expected)) +func (f *FunctionJavaResourceAssert) HasReturnResultsBehaviorString(expected string) *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("return_results_behavior", expected)) return f } @@ -147,12 +147,12 @@ func (f *FunctionJavaResourceAssert) HasTraceLevelString(expected string) *Funct return f } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (f *FunctionJavaResourceAssert) HasNoArguments() *FunctionJavaResourceAssert { - f.AddAssertion(assert.ValueNotSet("arguments")) + f.AddAssertion(assert.ValueSet("arguments.#", "0")) return f } @@ -172,7 +172,7 @@ func (f *FunctionJavaResourceAssert) HasNoEnableConsoleOutput() *FunctionJavaRes } func (f *FunctionJavaResourceAssert) HasNoExternalAccessIntegrations() *FunctionJavaResourceAssert { - f.AddAssertion(assert.ValueNotSet("external_access_integrations")) + f.AddAssertion(assert.ValueSet("external_access_integrations.#", "0")) return f } @@ -197,7 +197,7 @@ func (f *FunctionJavaResourceAssert) HasNoHandler() *FunctionJavaResourceAssert } func (f *FunctionJavaResourceAssert) HasNoImports() *FunctionJavaResourceAssert { - f.AddAssertion(assert.ValueNotSet("imports")) + f.AddAssertion(assert.ValueSet("imports.#", "0")) return f } @@ -227,12 +227,12 @@ func (f *FunctionJavaResourceAssert) HasNoNullInputBehavior() *FunctionJavaResou } func (f *FunctionJavaResourceAssert) HasNoPackages() *FunctionJavaResourceAssert { - f.AddAssertion(assert.ValueNotSet("packages")) + f.AddAssertion(assert.ValueSet("packages.#", "0")) return f } -func (f *FunctionJavaResourceAssert) HasNoReturnBehavior() *FunctionJavaResourceAssert { - f.AddAssertion(assert.ValueNotSet("return_behavior")) +func (f *FunctionJavaResourceAssert) HasNoReturnResultsBehavior() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueNotSet("return_results_behavior")) return f } @@ -252,12 +252,12 @@ func (f *FunctionJavaResourceAssert) HasNoSchema() *FunctionJavaResourceAssert { } func (f *FunctionJavaResourceAssert) HasNoSecrets() *FunctionJavaResourceAssert { - f.AddAssertion(assert.ValueNotSet("secrets")) + f.AddAssertion(assert.ValueSet("secrets.#", "0")) return f } func (f *FunctionJavaResourceAssert) HasNoTargetPath() *FunctionJavaResourceAssert { - f.AddAssertion(assert.ValueNotSet("target_path")) + f.AddAssertion(assert.ValueSet("target_path.#", "0")) return f } @@ -265,3 +265,191 @@ func (f *FunctionJavaResourceAssert) HasNoTraceLevel() *FunctionJavaResourceAsse f.AddAssertion(assert.ValueNotSet("trace_level")) return f } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (f *FunctionJavaResourceAssert) HasCommentEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("comment", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasDatabaseEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("database", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasFullyQualifiedNameEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasFunctionDefinitionEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("function_definition", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasFunctionLanguageEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("function_language", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasHandlerEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("handler", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasIsSecureEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("is_secure", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasLogLevelEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("log_level", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasMetricLevelEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("metric_level", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasNameEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("name", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasNullInputBehaviorEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("null_input_behavior", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasReturnResultsBehaviorEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("return_results_behavior", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasReturnTypeEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("return_type", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasRuntimeVersionEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("runtime_version", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasSchemaEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("schema", "")) + return f +} +func (f *FunctionJavaResourceAssert) HasTraceLevelEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValueSet("trace_level", "")) + return f +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (f *FunctionJavaResourceAssert) HasArgumentsNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("arguments")) + return f +} + +func (f *FunctionJavaResourceAssert) HasCommentNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("comment")) + return f +} + +func (f *FunctionJavaResourceAssert) HasDatabaseNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("database")) + return f +} + +func (f *FunctionJavaResourceAssert) HasEnableConsoleOutputNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("enable_console_output")) + return f +} + +func (f *FunctionJavaResourceAssert) HasExternalAccessIntegrationsNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("external_access_integrations")) + return f +} + +func (f *FunctionJavaResourceAssert) HasFullyQualifiedNameNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return f +} + +func (f *FunctionJavaResourceAssert) HasFunctionDefinitionNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("function_definition")) + return f +} + +func (f *FunctionJavaResourceAssert) HasFunctionLanguageNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("function_language")) + return f +} + +func (f *FunctionJavaResourceAssert) HasHandlerNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("handler")) + return f +} + +func (f *FunctionJavaResourceAssert) HasImportsNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("imports")) + return f +} + +func (f *FunctionJavaResourceAssert) HasIsSecureNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("is_secure")) + return f +} + +func (f *FunctionJavaResourceAssert) HasLogLevelNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("log_level")) + return f +} + +func (f *FunctionJavaResourceAssert) HasMetricLevelNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("metric_level")) + return f +} + +func (f *FunctionJavaResourceAssert) HasNameNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("name")) + return f +} + +func (f *FunctionJavaResourceAssert) HasNullInputBehaviorNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("null_input_behavior")) + return f +} + +func (f *FunctionJavaResourceAssert) HasPackagesNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("packages")) + return f +} + +func (f *FunctionJavaResourceAssert) HasReturnResultsBehaviorNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("return_results_behavior")) + return f +} + +func (f *FunctionJavaResourceAssert) HasReturnTypeNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("return_type")) + return f +} + +func (f *FunctionJavaResourceAssert) HasRuntimeVersionNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("runtime_version")) + return f +} + +func (f *FunctionJavaResourceAssert) HasSchemaNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("schema")) + return f +} + +func (f *FunctionJavaResourceAssert) HasSecretsNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("secrets")) + return f +} + +func (f *FunctionJavaResourceAssert) HasTargetPathNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("target_path")) + return f +} + +func (f *FunctionJavaResourceAssert) HasTraceLevelNotEmpty() *FunctionJavaResourceAssert { + f.AddAssertion(assert.ValuePresent("trace_level")) + return f +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/function_javascript_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/function_javascript_resource_gen.go index 86fa5f5a52..81bf91f26e 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/function_javascript_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/function_javascript_resource_gen.go @@ -92,7 +92,7 @@ func (f *FunctionJavascriptResourceAssert) HasNullInputBehaviorString(expected s return f } -func (f *FunctionJavascriptResourceAssert) HasReturnBehaviorString(expected string) *FunctionJavascriptResourceAssert { +func (f *FunctionJavascriptResourceAssert) HasReturnResultsBehaviorString(expected string) *FunctionJavascriptResourceAssert { f.AddAssertion(assert.ValueSet("return_results_behavior", expected)) return f } @@ -112,12 +112,12 @@ func (f *FunctionJavascriptResourceAssert) HasTraceLevelString(expected string) return f } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (f *FunctionJavascriptResourceAssert) HasNoArguments() *FunctionJavascriptResourceAssert { - f.AddAssertion(assert.ValueNotSet("arguments")) + f.AddAssertion(assert.ValueSet("arguments.#", "0")) return f } @@ -176,8 +176,8 @@ func (f *FunctionJavascriptResourceAssert) HasNoNullInputBehavior() *FunctionJav return f } -func (f *FunctionJavascriptResourceAssert) HasNoReturnBehavior() *FunctionJavascriptResourceAssert { - f.AddAssertion(assert.ValueNotSet("return_behavior")) +func (f *FunctionJavascriptResourceAssert) HasNoReturnResultsBehavior() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueNotSet("return_results_behavior")) return f } @@ -195,3 +195,148 @@ func (f *FunctionJavascriptResourceAssert) HasNoTraceLevel() *FunctionJavascript f.AddAssertion(assert.ValueNotSet("trace_level")) return f } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (f *FunctionJavascriptResourceAssert) HasCommentEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("comment", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasDatabaseEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("database", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasFullyQualifiedNameEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasFunctionDefinitionEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("function_definition", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasFunctionLanguageEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("function_language", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasIsSecureEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("is_secure", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasLogLevelEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("log_level", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasMetricLevelEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("metric_level", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasNameEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("name", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasNullInputBehaviorEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("null_input_behavior", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasReturnResultsBehaviorEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("return_results_behavior", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasReturnTypeEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("return_type", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasSchemaEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("schema", "")) + return f +} +func (f *FunctionJavascriptResourceAssert) HasTraceLevelEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValueSet("trace_level", "")) + return f +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (f *FunctionJavascriptResourceAssert) HasArgumentsNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("arguments")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasCommentNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("comment")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasDatabaseNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("database")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasEnableConsoleOutputNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("enable_console_output")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasFullyQualifiedNameNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasFunctionDefinitionNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("function_definition")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasFunctionLanguageNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("function_language")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasIsSecureNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("is_secure")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasLogLevelNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("log_level")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasMetricLevelNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("metric_level")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasNameNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("name")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasNullInputBehaviorNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("null_input_behavior")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasReturnResultsBehaviorNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("return_results_behavior")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasReturnTypeNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("return_type")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasSchemaNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("schema")) + return f +} + +func (f *FunctionJavascriptResourceAssert) HasTraceLevelNotEmpty() *FunctionJavascriptResourceAssert { + f.AddAssertion(assert.ValuePresent("trace_level")) + return f +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/function_python_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/function_python_resource_gen.go index 17a9849c99..e967716f83 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/function_python_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/function_python_resource_gen.go @@ -117,8 +117,8 @@ func (f *FunctionPythonResourceAssert) HasPackagesString(expected string) *Funct return f } -func (f *FunctionPythonResourceAssert) HasReturnBehaviorString(expected string) *FunctionPythonResourceAssert { - f.AddAssertion(assert.ValueSet("return_behavior", expected)) +func (f *FunctionPythonResourceAssert) HasReturnResultsBehaviorString(expected string) *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("return_results_behavior", expected)) return f } @@ -147,12 +147,12 @@ func (f *FunctionPythonResourceAssert) HasTraceLevelString(expected string) *Fun return f } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (f *FunctionPythonResourceAssert) HasNoArguments() *FunctionPythonResourceAssert { - f.AddAssertion(assert.ValueNotSet("arguments")) + f.AddAssertion(assert.ValueSet("arguments.#", "0")) return f } @@ -172,7 +172,7 @@ func (f *FunctionPythonResourceAssert) HasNoEnableConsoleOutput() *FunctionPytho } func (f *FunctionPythonResourceAssert) HasNoExternalAccessIntegrations() *FunctionPythonResourceAssert { - f.AddAssertion(assert.ValueNotSet("external_access_integrations")) + f.AddAssertion(assert.ValueSet("external_access_integrations.#", "0")) return f } @@ -197,7 +197,7 @@ func (f *FunctionPythonResourceAssert) HasNoHandler() *FunctionPythonResourceAss } func (f *FunctionPythonResourceAssert) HasNoImports() *FunctionPythonResourceAssert { - f.AddAssertion(assert.ValueNotSet("imports")) + f.AddAssertion(assert.ValueSet("imports.#", "0")) return f } @@ -232,12 +232,12 @@ func (f *FunctionPythonResourceAssert) HasNoNullInputBehavior() *FunctionPythonR } func (f *FunctionPythonResourceAssert) HasNoPackages() *FunctionPythonResourceAssert { - f.AddAssertion(assert.ValueNotSet("packages")) + f.AddAssertion(assert.ValueSet("packages.#", "0")) return f } -func (f *FunctionPythonResourceAssert) HasNoReturnBehavior() *FunctionPythonResourceAssert { - f.AddAssertion(assert.ValueNotSet("return_behavior")) +func (f *FunctionPythonResourceAssert) HasNoReturnResultsBehavior() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueNotSet("return_results_behavior")) return f } @@ -257,7 +257,7 @@ func (f *FunctionPythonResourceAssert) HasNoSchema() *FunctionPythonResourceAsse } func (f *FunctionPythonResourceAssert) HasNoSecrets() *FunctionPythonResourceAssert { - f.AddAssertion(assert.ValueNotSet("secrets")) + f.AddAssertion(assert.ValueSet("secrets.#", "0")) return f } @@ -265,3 +265,195 @@ func (f *FunctionPythonResourceAssert) HasNoTraceLevel() *FunctionPythonResource f.AddAssertion(assert.ValueNotSet("trace_level")) return f } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (f *FunctionPythonResourceAssert) HasCommentEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("comment", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasDatabaseEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("database", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasFullyQualifiedNameEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasFunctionDefinitionEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("function_definition", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasFunctionLanguageEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("function_language", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasHandlerEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("handler", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasIsAggregateEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("is_aggregate", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasIsSecureEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("is_secure", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasLogLevelEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("log_level", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasMetricLevelEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("metric_level", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasNameEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("name", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasNullInputBehaviorEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("null_input_behavior", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasReturnResultsBehaviorEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("return_results_behavior", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasReturnTypeEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("return_type", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasRuntimeVersionEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("runtime_version", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasSchemaEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("schema", "")) + return f +} +func (f *FunctionPythonResourceAssert) HasTraceLevelEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValueSet("trace_level", "")) + return f +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (f *FunctionPythonResourceAssert) HasArgumentsNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("arguments")) + return f +} + +func (f *FunctionPythonResourceAssert) HasCommentNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("comment")) + return f +} + +func (f *FunctionPythonResourceAssert) HasDatabaseNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("database")) + return f +} + +func (f *FunctionPythonResourceAssert) HasEnableConsoleOutputNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("enable_console_output")) + return f +} + +func (f *FunctionPythonResourceAssert) HasExternalAccessIntegrationsNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("external_access_integrations")) + return f +} + +func (f *FunctionPythonResourceAssert) HasFullyQualifiedNameNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return f +} + +func (f *FunctionPythonResourceAssert) HasFunctionDefinitionNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("function_definition")) + return f +} + +func (f *FunctionPythonResourceAssert) HasFunctionLanguageNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("function_language")) + return f +} + +func (f *FunctionPythonResourceAssert) HasHandlerNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("handler")) + return f +} + +func (f *FunctionPythonResourceAssert) HasImportsNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("imports")) + return f +} + +func (f *FunctionPythonResourceAssert) HasIsAggregateNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("is_aggregate")) + return f +} + +func (f *FunctionPythonResourceAssert) HasIsSecureNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("is_secure")) + return f +} + +func (f *FunctionPythonResourceAssert) HasLogLevelNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("log_level")) + return f +} + +func (f *FunctionPythonResourceAssert) HasMetricLevelNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("metric_level")) + return f +} + +func (f *FunctionPythonResourceAssert) HasNameNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("name")) + return f +} + +func (f *FunctionPythonResourceAssert) HasNullInputBehaviorNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("null_input_behavior")) + return f +} + +func (f *FunctionPythonResourceAssert) HasPackagesNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("packages")) + return f +} + +func (f *FunctionPythonResourceAssert) HasReturnResultsBehaviorNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("return_results_behavior")) + return f +} + +func (f *FunctionPythonResourceAssert) HasReturnTypeNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("return_type")) + return f +} + +func (f *FunctionPythonResourceAssert) HasRuntimeVersionNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("runtime_version")) + return f +} + +func (f *FunctionPythonResourceAssert) HasSchemaNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("schema")) + return f +} + +func (f *FunctionPythonResourceAssert) HasSecretsNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("secrets")) + return f +} + +func (f *FunctionPythonResourceAssert) HasTraceLevelNotEmpty() *FunctionPythonResourceAssert { + f.AddAssertion(assert.ValuePresent("trace_level")) + return f +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/function_scala_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/function_scala_resource_gen.go index be1ccc837a..27101f7b0e 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/function_scala_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/function_scala_resource_gen.go @@ -112,8 +112,8 @@ func (f *FunctionScalaResourceAssert) HasPackagesString(expected string) *Functi return f } -func (f *FunctionScalaResourceAssert) HasReturnBehaviorString(expected string) *FunctionScalaResourceAssert { - f.AddAssertion(assert.ValueSet("return_behavior", expected)) +func (f *FunctionScalaResourceAssert) HasReturnResultsBehaviorString(expected string) *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("return_results_behavior", expected)) return f } @@ -147,12 +147,12 @@ func (f *FunctionScalaResourceAssert) HasTraceLevelString(expected string) *Func return f } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (f *FunctionScalaResourceAssert) HasNoArguments() *FunctionScalaResourceAssert { - f.AddAssertion(assert.ValueNotSet("arguments")) + f.AddAssertion(assert.ValueSet("arguments.#", "0")) return f } @@ -172,7 +172,7 @@ func (f *FunctionScalaResourceAssert) HasNoEnableConsoleOutput() *FunctionScalaR } func (f *FunctionScalaResourceAssert) HasNoExternalAccessIntegrations() *FunctionScalaResourceAssert { - f.AddAssertion(assert.ValueNotSet("external_access_integrations")) + f.AddAssertion(assert.ValueSet("external_access_integrations.#", "0")) return f } @@ -197,7 +197,7 @@ func (f *FunctionScalaResourceAssert) HasNoHandler() *FunctionScalaResourceAsser } func (f *FunctionScalaResourceAssert) HasNoImports() *FunctionScalaResourceAssert { - f.AddAssertion(assert.ValueNotSet("imports")) + f.AddAssertion(assert.ValueSet("imports.#", "0")) return f } @@ -227,12 +227,12 @@ func (f *FunctionScalaResourceAssert) HasNoNullInputBehavior() *FunctionScalaRes } func (f *FunctionScalaResourceAssert) HasNoPackages() *FunctionScalaResourceAssert { - f.AddAssertion(assert.ValueNotSet("packages")) + f.AddAssertion(assert.ValueSet("packages.#", "0")) return f } -func (f *FunctionScalaResourceAssert) HasNoReturnBehavior() *FunctionScalaResourceAssert { - f.AddAssertion(assert.ValueNotSet("return_behavior")) +func (f *FunctionScalaResourceAssert) HasNoReturnResultsBehavior() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueNotSet("return_results_behavior")) return f } @@ -252,12 +252,12 @@ func (f *FunctionScalaResourceAssert) HasNoSchema() *FunctionScalaResourceAssert } func (f *FunctionScalaResourceAssert) HasNoSecrets() *FunctionScalaResourceAssert { - f.AddAssertion(assert.ValueNotSet("secrets")) + f.AddAssertion(assert.ValueSet("secrets.#", "0")) return f } func (f *FunctionScalaResourceAssert) HasNoTargetPath() *FunctionScalaResourceAssert { - f.AddAssertion(assert.ValueNotSet("target_path")) + f.AddAssertion(assert.ValueSet("target_path.#", "0")) return f } @@ -265,3 +265,191 @@ func (f *FunctionScalaResourceAssert) HasNoTraceLevel() *FunctionScalaResourceAs f.AddAssertion(assert.ValueNotSet("trace_level")) return f } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (f *FunctionScalaResourceAssert) HasCommentEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("comment", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasDatabaseEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("database", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasFullyQualifiedNameEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasFunctionDefinitionEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("function_definition", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasFunctionLanguageEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("function_language", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasHandlerEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("handler", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasIsSecureEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("is_secure", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasLogLevelEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("log_level", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasMetricLevelEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("metric_level", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasNameEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("name", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasNullInputBehaviorEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("null_input_behavior", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasReturnResultsBehaviorEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("return_results_behavior", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasReturnTypeEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("return_type", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasRuntimeVersionEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("runtime_version", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasSchemaEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("schema", "")) + return f +} +func (f *FunctionScalaResourceAssert) HasTraceLevelEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValueSet("trace_level", "")) + return f +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (f *FunctionScalaResourceAssert) HasArgumentsNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("arguments")) + return f +} + +func (f *FunctionScalaResourceAssert) HasCommentNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("comment")) + return f +} + +func (f *FunctionScalaResourceAssert) HasDatabaseNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("database")) + return f +} + +func (f *FunctionScalaResourceAssert) HasEnableConsoleOutputNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("enable_console_output")) + return f +} + +func (f *FunctionScalaResourceAssert) HasExternalAccessIntegrationsNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("external_access_integrations")) + return f +} + +func (f *FunctionScalaResourceAssert) HasFullyQualifiedNameNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return f +} + +func (f *FunctionScalaResourceAssert) HasFunctionDefinitionNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("function_definition")) + return f +} + +func (f *FunctionScalaResourceAssert) HasFunctionLanguageNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("function_language")) + return f +} + +func (f *FunctionScalaResourceAssert) HasHandlerNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("handler")) + return f +} + +func (f *FunctionScalaResourceAssert) HasImportsNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("imports")) + return f +} + +func (f *FunctionScalaResourceAssert) HasIsSecureNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("is_secure")) + return f +} + +func (f *FunctionScalaResourceAssert) HasLogLevelNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("log_level")) + return f +} + +func (f *FunctionScalaResourceAssert) HasMetricLevelNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("metric_level")) + return f +} + +func (f *FunctionScalaResourceAssert) HasNameNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("name")) + return f +} + +func (f *FunctionScalaResourceAssert) HasNullInputBehaviorNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("null_input_behavior")) + return f +} + +func (f *FunctionScalaResourceAssert) HasPackagesNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("packages")) + return f +} + +func (f *FunctionScalaResourceAssert) HasReturnResultsBehaviorNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("return_results_behavior")) + return f +} + +func (f *FunctionScalaResourceAssert) HasReturnTypeNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("return_type")) + return f +} + +func (f *FunctionScalaResourceAssert) HasRuntimeVersionNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("runtime_version")) + return f +} + +func (f *FunctionScalaResourceAssert) HasSchemaNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("schema")) + return f +} + +func (f *FunctionScalaResourceAssert) HasSecretsNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("secrets")) + return f +} + +func (f *FunctionScalaResourceAssert) HasTargetPathNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("target_path")) + return f +} + +func (f *FunctionScalaResourceAssert) HasTraceLevelNotEmpty() *FunctionScalaResourceAssert { + f.AddAssertion(assert.ValuePresent("trace_level")) + return f +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/function_sql_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/function_sql_resource_gen.go index 7a4188adeb..336734e302 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/function_sql_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/function_sql_resource_gen.go @@ -87,12 +87,7 @@ func (f *FunctionSqlResourceAssert) HasNameString(expected string) *FunctionSqlR return f } -func (f *FunctionSqlResourceAssert) HasNullInputBehaviorString(expected string) *FunctionSqlResourceAssert { - f.AddAssertion(assert.ValueSet("null_input_behavior", expected)) - return f -} - -func (f *FunctionSqlResourceAssert) HasReturnBehaviorString(expected string) *FunctionSqlResourceAssert { +func (f *FunctionSqlResourceAssert) HasReturnResultsBehaviorString(expected string) *FunctionSqlResourceAssert { f.AddAssertion(assert.ValueSet("return_results_behavior", expected)) return f } @@ -112,12 +107,12 @@ func (f *FunctionSqlResourceAssert) HasTraceLevelString(expected string) *Functi return f } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (f *FunctionSqlResourceAssert) HasNoArguments() *FunctionSqlResourceAssert { - f.AddAssertion(assert.ValueNotSet("arguments")) + f.AddAssertion(assert.ValueSet("arguments.#", "0")) return f } @@ -171,13 +166,8 @@ func (f *FunctionSqlResourceAssert) HasNoName() *FunctionSqlResourceAssert { return f } -func (f *FunctionSqlResourceAssert) HasNoNullInputBehavior() *FunctionSqlResourceAssert { - f.AddAssertion(assert.ValueNotSet("null_input_behavior")) - return f -} - -func (f *FunctionSqlResourceAssert) HasNoReturnBehavior() *FunctionSqlResourceAssert { - f.AddAssertion(assert.ValueNotSet("return_behavior")) +func (f *FunctionSqlResourceAssert) HasNoReturnResultsBehavior() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueNotSet("return_results_behavior")) return f } @@ -195,3 +185,139 @@ func (f *FunctionSqlResourceAssert) HasNoTraceLevel() *FunctionSqlResourceAssert f.AddAssertion(assert.ValueNotSet("trace_level")) return f } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (f *FunctionSqlResourceAssert) HasCommentEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("comment", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasDatabaseEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("database", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasFullyQualifiedNameEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasFunctionDefinitionEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("function_definition", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasFunctionLanguageEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("function_language", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasIsSecureEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("is_secure", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasLogLevelEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("log_level", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasMetricLevelEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("metric_level", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasNameEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("name", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasReturnResultsBehaviorEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("return_results_behavior", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasReturnTypeEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("return_type", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasSchemaEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("schema", "")) + return f +} +func (f *FunctionSqlResourceAssert) HasTraceLevelEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValueSet("trace_level", "")) + return f +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (f *FunctionSqlResourceAssert) HasArgumentsNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("arguments")) + return f +} + +func (f *FunctionSqlResourceAssert) HasCommentNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("comment")) + return f +} + +func (f *FunctionSqlResourceAssert) HasDatabaseNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("database")) + return f +} + +func (f *FunctionSqlResourceAssert) HasEnableConsoleOutputNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("enable_console_output")) + return f +} + +func (f *FunctionSqlResourceAssert) HasFullyQualifiedNameNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return f +} + +func (f *FunctionSqlResourceAssert) HasFunctionDefinitionNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("function_definition")) + return f +} + +func (f *FunctionSqlResourceAssert) HasFunctionLanguageNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("function_language")) + return f +} + +func (f *FunctionSqlResourceAssert) HasIsSecureNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("is_secure")) + return f +} + +func (f *FunctionSqlResourceAssert) HasLogLevelNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("log_level")) + return f +} + +func (f *FunctionSqlResourceAssert) HasMetricLevelNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("metric_level")) + return f +} + +func (f *FunctionSqlResourceAssert) HasNameNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("name")) + return f +} + +func (f *FunctionSqlResourceAssert) HasReturnResultsBehaviorNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("return_results_behavior")) + return f +} + +func (f *FunctionSqlResourceAssert) HasReturnTypeNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("return_type")) + return f +} + +func (f *FunctionSqlResourceAssert) HasSchemaNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("schema")) + return f +} + +func (f *FunctionSqlResourceAssert) HasTraceLevelNotEmpty() *FunctionSqlResourceAssert { + f.AddAssertion(assert.ValuePresent("trace_level")) + return f +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/legacy_service_user_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/legacy_service_user_resource_gen.go index 3cefca9af2..ab2f274e62 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/legacy_service_user_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/legacy_service_user_resource_gen.go @@ -412,9 +412,9 @@ func (l *LegacyServiceUserResourceAssert) HasWeekStartString(expected string) *L return l } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (l *LegacyServiceUserResourceAssert) HasNoAbortDetachedQuery() *LegacyServiceUserResourceAssert { l.AddAssertion(assert.ValueNotSet("abort_detached_query")) @@ -795,3 +795,556 @@ func (l *LegacyServiceUserResourceAssert) HasNoWeekStart() *LegacyServiceUserRes l.AddAssertion(assert.ValueNotSet("week_start")) return l } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (l *LegacyServiceUserResourceAssert) HasBinaryInputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("binary_input_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasBinaryOutputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("binary_output_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasClientTimestampTypeMappingEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("client_timestamp_type_mapping", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasCommentEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("comment", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasDateInputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("date_input_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasDateOutputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("date_output_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasDefaultNamespaceEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("default_namespace", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasDefaultRoleEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("default_role", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasDefaultSecondaryRolesOptionEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("default_secondary_roles_option", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasDefaultWarehouseEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("default_warehouse", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasDisabledEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("disabled", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasDisplayNameEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("display_name", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasEmailEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("email", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasFullyQualifiedNameEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasGeographyOutputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("geography_output_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasGeometryOutputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("geometry_output_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasLogLevelEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("log_level", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasLoginNameEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("login_name", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasMustChangePasswordEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("must_change_password", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasNameEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("name", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasNetworkPolicyEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("network_policy", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasPasswordEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("password", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasQueryTagEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("query_tag", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasRsaPublicKeyEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("rsa_public_key", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasRsaPublicKey2Empty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("rsa_public_key_2", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasS3StageVpceDnsNameEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("s3_stage_vpce_dns_name", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasSearchPathEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("search_path", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasSimulatedDataSharingConsumerEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("simulated_data_sharing_consumer", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTimeInputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("time_input_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTimeOutputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("time_output_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTimestampInputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("timestamp_input_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTimestampLtzOutputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("timestamp_ltz_output_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTimestampNtzOutputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("timestamp_ntz_output_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTimestampOutputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("timestamp_output_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTimestampTypeMappingEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("timestamp_type_mapping", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTimestampTzOutputFormatEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("timestamp_tz_output_format", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTimezoneEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("timezone", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTraceLevelEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("trace_level", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasTransactionDefaultIsolationLevelEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("transaction_default_isolation_level", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasUnsupportedDdlActionEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("unsupported_ddl_action", "")) + return l +} +func (l *LegacyServiceUserResourceAssert) HasUserTypeEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValueSet("user_type", "")) + return l +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (l *LegacyServiceUserResourceAssert) HasAbortDetachedQueryNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("abort_detached_query")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasAutocommitNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("autocommit")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasBinaryInputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("binary_input_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasBinaryOutputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("binary_output_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasClientMemoryLimitNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("client_memory_limit")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasClientMetadataRequestUseConnectionCtxNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("client_metadata_request_use_connection_ctx")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasClientPrefetchThreadsNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("client_prefetch_threads")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasClientResultChunkSizeNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("client_result_chunk_size")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasClientResultColumnCaseInsensitiveNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("client_result_column_case_insensitive")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasClientSessionKeepAliveNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("client_session_keep_alive")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasClientSessionKeepAliveHeartbeatFrequencyNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("client_session_keep_alive_heartbeat_frequency")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasClientTimestampTypeMappingNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("client_timestamp_type_mapping")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasCommentNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("comment")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasDateInputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("date_input_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasDateOutputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("date_output_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasDaysToExpiryNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("days_to_expiry")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasDefaultNamespaceNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("default_namespace")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasDefaultRoleNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("default_role")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasDefaultSecondaryRolesOptionNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("default_secondary_roles_option")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasDefaultWarehouseNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("default_warehouse")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasDisabledNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("disabled")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasDisplayNameNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("display_name")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasEmailNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("email")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasEnableUnloadPhysicalTypeOptimizationNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("enable_unload_physical_type_optimization")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasEnableUnredactedQuerySyntaxErrorNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("enable_unredacted_query_syntax_error")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasErrorOnNondeterministicMergeNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("error_on_nondeterministic_merge")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasErrorOnNondeterministicUpdateNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("error_on_nondeterministic_update")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasFullyQualifiedNameNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasGeographyOutputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("geography_output_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasGeometryOutputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("geometry_output_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasJdbcTreatDecimalAsIntNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("jdbc_treat_decimal_as_int")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasJdbcTreatTimestampNtzAsUtcNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("jdbc_treat_timestamp_ntz_as_utc")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasJdbcUseSessionTimezoneNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("jdbc_use_session_timezone")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasJsonIndentNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("json_indent")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasLockTimeoutNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("lock_timeout")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasLogLevelNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("log_level")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasLoginNameNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("login_name")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasMinsToUnlockNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("mins_to_unlock")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasMultiStatementCountNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("multi_statement_count")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasMustChangePasswordNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("must_change_password")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasNameNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("name")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasNetworkPolicyNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("network_policy")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasNoorderSequenceAsDefaultNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("noorder_sequence_as_default")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasOdbcTreatDecimalAsIntNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("odbc_treat_decimal_as_int")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasPasswordNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("password")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasPreventUnloadToInternalStagesNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("prevent_unload_to_internal_stages")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasQueryTagNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("query_tag")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasQuotedIdentifiersIgnoreCaseNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("quoted_identifiers_ignore_case")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasRowsPerResultsetNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("rows_per_resultset")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasRsaPublicKeyNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("rsa_public_key")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasRsaPublicKey2NotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("rsa_public_key_2")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasS3StageVpceDnsNameNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("s3_stage_vpce_dns_name")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasSearchPathNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("search_path")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasSimulatedDataSharingConsumerNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("simulated_data_sharing_consumer")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasStatementQueuedTimeoutInSecondsNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("statement_queued_timeout_in_seconds")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasStatementTimeoutInSecondsNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("statement_timeout_in_seconds")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasStrictJsonOutputNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("strict_json_output")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTimeInputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("time_input_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTimeOutputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("time_output_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTimestampDayIsAlways24hNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("timestamp_day_is_always_24h")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTimestampInputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("timestamp_input_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTimestampLtzOutputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("timestamp_ltz_output_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTimestampNtzOutputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("timestamp_ntz_output_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTimestampOutputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("timestamp_output_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTimestampTypeMappingNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("timestamp_type_mapping")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTimestampTzOutputFormatNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("timestamp_tz_output_format")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTimezoneNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("timezone")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTraceLevelNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("trace_level")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTransactionAbortOnErrorNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("transaction_abort_on_error")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTransactionDefaultIsolationLevelNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("transaction_default_isolation_level")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasTwoDigitCenturyStartNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("two_digit_century_start")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasUnsupportedDdlActionNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("unsupported_ddl_action")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasUseCachedResultNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("use_cached_result")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasUserTypeNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("user_type")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasWeekOfYearPolicyNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("week_of_year_policy")) + return l +} + +func (l *LegacyServiceUserResourceAssert) HasWeekStartNotEmpty() *LegacyServiceUserResourceAssert { + l.AddAssertion(assert.ValuePresent("week_start")) + return l +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/masking_policy_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/masking_policy_resource_gen.go index 4c49ed3cbd..b9bece3645 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/masking_policy_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/masking_policy_resource_gen.go @@ -77,12 +77,12 @@ func (m *MaskingPolicyResourceAssert) HasSchemaString(expected string) *MaskingP return m } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (m *MaskingPolicyResourceAssert) HasNoArgument() *MaskingPolicyResourceAssert { - m.AddAssertion(assert.ValueNotSet("argument")) + m.AddAssertion(assert.ValueSet("argument.#", "0")) return m } @@ -125,3 +125,89 @@ func (m *MaskingPolicyResourceAssert) HasNoSchema() *MaskingPolicyResourceAssert m.AddAssertion(assert.ValueNotSet("schema")) return m } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (m *MaskingPolicyResourceAssert) HasBodyEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValueSet("body", "")) + return m +} +func (m *MaskingPolicyResourceAssert) HasCommentEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValueSet("comment", "")) + return m +} +func (m *MaskingPolicyResourceAssert) HasDatabaseEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValueSet("database", "")) + return m +} +func (m *MaskingPolicyResourceAssert) HasExemptOtherPoliciesEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValueSet("exempt_other_policies", "")) + return m +} +func (m *MaskingPolicyResourceAssert) HasFullyQualifiedNameEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return m +} +func (m *MaskingPolicyResourceAssert) HasNameEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValueSet("name", "")) + return m +} +func (m *MaskingPolicyResourceAssert) HasReturnDataTypeEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValueSet("return_data_type", "")) + return m +} +func (m *MaskingPolicyResourceAssert) HasSchemaEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValueSet("schema", "")) + return m +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (m *MaskingPolicyResourceAssert) HasArgumentNotEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValuePresent("argument")) + return m +} + +func (m *MaskingPolicyResourceAssert) HasBodyNotEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValuePresent("body")) + return m +} + +func (m *MaskingPolicyResourceAssert) HasCommentNotEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValuePresent("comment")) + return m +} + +func (m *MaskingPolicyResourceAssert) HasDatabaseNotEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValuePresent("database")) + return m +} + +func (m *MaskingPolicyResourceAssert) HasExemptOtherPoliciesNotEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValuePresent("exempt_other_policies")) + return m +} + +func (m *MaskingPolicyResourceAssert) HasFullyQualifiedNameNotEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return m +} + +func (m *MaskingPolicyResourceAssert) HasNameNotEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValuePresent("name")) + return m +} + +func (m *MaskingPolicyResourceAssert) HasReturnDataTypeNotEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValuePresent("return_data_type")) + return m +} + +func (m *MaskingPolicyResourceAssert) HasSchemaNotEmpty() *MaskingPolicyResourceAssert { + m.AddAssertion(assert.ValuePresent("schema")) + return m +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/oauth_integration_for_custom_clients_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/oauth_integration_for_custom_clients_resource_gen.go index d1ef7b4754..aa1e3c3d92 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/oauth_integration_for_custom_clients_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/oauth_integration_for_custom_clients_resource_gen.go @@ -112,12 +112,17 @@ func (o *OauthIntegrationForCustomClientsResourceAssert) HasPreAuthorizedRolesLi return o } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +func (o *OauthIntegrationForCustomClientsResourceAssert) HasRelatedParametersString(expected string) *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("related_parameters", expected)) + return o +} + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (o *OauthIntegrationForCustomClientsResourceAssert) HasNoBlockedRolesList() *OauthIntegrationForCustomClientsResourceAssert { - o.AddAssertion(assert.ValueNotSet("blocked_roles_list")) + o.AddAssertion(assert.ValueSet("blocked_roles_list.#", "0")) return o } @@ -192,6 +197,157 @@ func (o *OauthIntegrationForCustomClientsResourceAssert) HasNoOauthUseSecondaryR } func (o *OauthIntegrationForCustomClientsResourceAssert) HasNoPreAuthorizedRolesList() *OauthIntegrationForCustomClientsResourceAssert { - o.AddAssertion(assert.ValueNotSet("pre_authorized_roles_list")) + o.AddAssertion(assert.ValueSet("pre_authorized_roles_list.#", "0")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasNoRelatedParameters() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("related_parameters.#", "0")) + return o +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasCommentEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("comment", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasEnabledEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("enabled", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasFullyQualifiedNameEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasNameEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("name", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasNetworkPolicyEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("network_policy", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthAllowNonTlsRedirectUriEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_allow_non_tls_redirect_uri", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthClientRsaPublicKeyEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_client_rsa_public_key", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthClientRsaPublicKey2Empty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_client_rsa_public_key_2", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthClientTypeEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_client_type", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthEnforcePkceEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_enforce_pkce", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthIssueRefreshTokensEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_issue_refresh_tokens", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthRedirectUriEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_redirect_uri", "")) + return o +} +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthUseSecondaryRolesEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_use_secondary_roles", "")) + return o +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasBlockedRolesListNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("blocked_roles_list")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasCommentNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("comment")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasEnabledNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("enabled")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasFullyQualifiedNameNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasNameNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("name")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasNetworkPolicyNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("network_policy")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthAllowNonTlsRedirectUriNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_allow_non_tls_redirect_uri")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthClientRsaPublicKeyNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_client_rsa_public_key")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthClientRsaPublicKey2NotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_client_rsa_public_key_2")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthClientTypeNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_client_type")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthEnforcePkceNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_enforce_pkce")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthIssueRefreshTokensNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_issue_refresh_tokens")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthRedirectUriNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_redirect_uri")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthRefreshTokenValidityNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_refresh_token_validity")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasOauthUseSecondaryRolesNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_use_secondary_roles")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasPreAuthorizedRolesListNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("pre_authorized_roles_list")) + return o +} + +func (o *OauthIntegrationForCustomClientsResourceAssert) HasRelatedParametersNotEmpty() *OauthIntegrationForCustomClientsResourceAssert { + o.AddAssertion(assert.ValuePresent("related_parameters")) return o } diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/oauth_integration_for_partner_applications_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/oauth_integration_for_partner_applications_resource_gen.go index 3d1be060d2..9ec43e9dc3 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/oauth_integration_for_partner_applications_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/oauth_integration_for_partner_applications_resource_gen.go @@ -87,12 +87,12 @@ func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasRelatedParamet return o } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasNoBlockedRolesList() *OauthIntegrationForPartnerApplicationsResourceAssert { - o.AddAssertion(assert.ValueNotSet("blocked_roles_list")) + o.AddAssertion(assert.ValueSet("blocked_roles_list.#", "0")) return o } @@ -142,6 +142,102 @@ func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasNoOauthUseSeco } func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasNoRelatedParameters() *OauthIntegrationForPartnerApplicationsResourceAssert { - o.AddAssertion(assert.ValueNotSet("related_parameters")) + o.AddAssertion(assert.ValueSet("related_parameters.#", "0")) + return o +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasCommentEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValueSet("comment", "")) + return o +} +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasEnabledEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValueSet("enabled", "")) + return o +} +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasFullyQualifiedNameEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return o +} +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasNameEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValueSet("name", "")) + return o +} +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasOauthClientEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_client", "")) + return o +} +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasOauthIssueRefreshTokensEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_issue_refresh_tokens", "")) + return o +} +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasOauthRedirectUriEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_redirect_uri", "")) + return o +} +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasOauthUseSecondaryRolesEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValueSet("oauth_use_secondary_roles", "")) + return o +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasBlockedRolesListNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("blocked_roles_list")) + return o +} + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasCommentNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("comment")) + return o +} + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasEnabledNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("enabled")) + return o +} + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasFullyQualifiedNameNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return o +} + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasNameNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("name")) + return o +} + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasOauthClientNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_client")) + return o +} + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasOauthIssueRefreshTokensNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_issue_refresh_tokens")) + return o +} + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasOauthRedirectUriNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_redirect_uri")) + return o +} + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasOauthRefreshTokenValidityNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_refresh_token_validity")) + return o +} + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasOauthUseSecondaryRolesNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("oauth_use_secondary_roles")) + return o +} + +func (o *OauthIntegrationForPartnerApplicationsResourceAssert) HasRelatedParametersNotEmpty() *OauthIntegrationForPartnerApplicationsResourceAssert { + o.AddAssertion(assert.ValuePresent("related_parameters")) return o } diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/primary_connection_resource_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/primary_connection_resource_ext.go index b22dbfd4ee..af598b3c2d 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/primary_connection_resource_ext.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/primary_connection_resource_ext.go @@ -14,8 +14,3 @@ func (c *PrimaryConnectionResourceAssert) HasExactlyFailoverToAccountsInOrder(ex } return c } - -func (c *PrimaryConnectionResourceAssert) HasNoEnableFailoverToAccounts() *PrimaryConnectionResourceAssert { - c.AddAssertion(assert.ValueSet("enable_failover_to_accounts.#", "0")) - return c -} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/primary_connection_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/primary_connection_resource_gen.go index 9297a6408f..0108d63fdc 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/primary_connection_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/primary_connection_resource_gen.go @@ -47,33 +47,87 @@ func (p *PrimaryConnectionResourceAssert) HasFullyQualifiedNameString(expected s return p } +func (p *PrimaryConnectionResourceAssert) HasIsPrimaryString(expected string) *PrimaryConnectionResourceAssert { + p.AddAssertion(assert.ValueSet("is_primary", expected)) + return p +} + func (p *PrimaryConnectionResourceAssert) HasNameString(expected string) *PrimaryConnectionResourceAssert { p.AddAssertion(assert.ValueSet("name", expected)) return p } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (p *PrimaryConnectionResourceAssert) HasNoComment() *PrimaryConnectionResourceAssert { p.AddAssertion(assert.ValueNotSet("comment")) return p } -/* func (p *PrimaryConnectionResourceAssert) HasNoEnableFailoverToAccounts() *PrimaryConnectionResourceAssert { - p.AddAssertion(assert.ValueNotSet("enable_failover_to_accounts")) + p.AddAssertion(assert.ValueSet("enable_failover_to_accounts.#", "0")) return p } -*/ func (p *PrimaryConnectionResourceAssert) HasNoFullyQualifiedName() *PrimaryConnectionResourceAssert { p.AddAssertion(assert.ValueNotSet("fully_qualified_name")) return p } +func (p *PrimaryConnectionResourceAssert) HasNoIsPrimary() *PrimaryConnectionResourceAssert { + p.AddAssertion(assert.ValueNotSet("is_primary")) + return p +} + func (p *PrimaryConnectionResourceAssert) HasNoName() *PrimaryConnectionResourceAssert { p.AddAssertion(assert.ValueNotSet("name")) return p } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (p *PrimaryConnectionResourceAssert) HasCommentEmpty() *PrimaryConnectionResourceAssert { + p.AddAssertion(assert.ValueSet("comment", "")) + return p +} +func (p *PrimaryConnectionResourceAssert) HasFullyQualifiedNameEmpty() *PrimaryConnectionResourceAssert { + p.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return p +} +func (p *PrimaryConnectionResourceAssert) HasNameEmpty() *PrimaryConnectionResourceAssert { + p.AddAssertion(assert.ValueSet("name", "")) + return p +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (p *PrimaryConnectionResourceAssert) HasCommentNotEmpty() *PrimaryConnectionResourceAssert { + p.AddAssertion(assert.ValuePresent("comment")) + return p +} + +func (p *PrimaryConnectionResourceAssert) HasEnableFailoverToAccountsNotEmpty() *PrimaryConnectionResourceAssert { + p.AddAssertion(assert.ValuePresent("enable_failover_to_accounts")) + return p +} + +func (p *PrimaryConnectionResourceAssert) HasFullyQualifiedNameNotEmpty() *PrimaryConnectionResourceAssert { + p.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return p +} + +func (p *PrimaryConnectionResourceAssert) HasIsPrimaryNotEmpty() *PrimaryConnectionResourceAssert { + p.AddAssertion(assert.ValuePresent("is_primary")) + return p +} + +func (p *PrimaryConnectionResourceAssert) HasNameNotEmpty() *PrimaryConnectionResourceAssert { + p.AddAssertion(assert.ValuePresent("name")) + return p +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_java_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_java_resource_gen.go index 4330077161..d55a6ccb7e 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_java_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_java_resource_gen.go @@ -152,12 +152,12 @@ func (p *ProcedureJavaResourceAssert) HasTraceLevelString(expected string) *Proc return p } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (p *ProcedureJavaResourceAssert) HasNoArguments() *ProcedureJavaResourceAssert { - p.AddAssertion(assert.ValueNotSet("arguments")) + p.AddAssertion(assert.ValueSet("arguments.#", "0")) return p } @@ -182,7 +182,7 @@ func (p *ProcedureJavaResourceAssert) HasNoExecuteAs() *ProcedureJavaResourceAss } func (p *ProcedureJavaResourceAssert) HasNoExternalAccessIntegrations() *ProcedureJavaResourceAssert { - p.AddAssertion(assert.ValueNotSet("external_access_integrations")) + p.AddAssertion(assert.ValueSet("external_access_integrations.#", "0")) return p } @@ -197,7 +197,7 @@ func (p *ProcedureJavaResourceAssert) HasNoHandler() *ProcedureJavaResourceAsser } func (p *ProcedureJavaResourceAssert) HasNoImports() *ProcedureJavaResourceAssert { - p.AddAssertion(assert.ValueNotSet("imports")) + p.AddAssertion(assert.ValueSet("imports.#", "0")) return p } @@ -227,7 +227,7 @@ func (p *ProcedureJavaResourceAssert) HasNoNullInputBehavior() *ProcedureJavaRes } func (p *ProcedureJavaResourceAssert) HasNoPackages() *ProcedureJavaResourceAssert { - p.AddAssertion(assert.ValueNotSet("packages")) + p.AddAssertion(assert.ValueSet("packages.#", "0")) return p } @@ -257,7 +257,7 @@ func (p *ProcedureJavaResourceAssert) HasNoSchema() *ProcedureJavaResourceAssert } func (p *ProcedureJavaResourceAssert) HasNoSecrets() *ProcedureJavaResourceAssert { - p.AddAssertion(assert.ValueNotSet("secrets")) + p.AddAssertion(assert.ValueSet("secrets.#", "0")) return p } @@ -267,7 +267,7 @@ func (p *ProcedureJavaResourceAssert) HasNoSnowparkPackage() *ProcedureJavaResou } func (p *ProcedureJavaResourceAssert) HasNoTargetPath() *ProcedureJavaResourceAssert { - p.AddAssertion(assert.ValueNotSet("target_path")) + p.AddAssertion(assert.ValueSet("target_path.#", "0")) return p } @@ -275,3 +275,200 @@ func (p *ProcedureJavaResourceAssert) HasNoTraceLevel() *ProcedureJavaResourceAs p.AddAssertion(assert.ValueNotSet("trace_level")) return p } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (p *ProcedureJavaResourceAssert) HasCommentEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("comment", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasDatabaseEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("database", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasExecuteAsEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("execute_as", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasFullyQualifiedNameEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasHandlerEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("handler", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasIsSecureEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("is_secure", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasLogLevelEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("log_level", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasMetricLevelEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("metric_level", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasNameEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("name", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasNullInputBehaviorEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("null_input_behavior", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasProcedureDefinitionEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("procedure_definition", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasProcedureLanguageEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("procedure_language", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasReturnTypeEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("return_type", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasRuntimeVersionEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("runtime_version", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasSchemaEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("schema", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasSnowparkPackageEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("snowpark_package", "")) + return p +} +func (p *ProcedureJavaResourceAssert) HasTraceLevelEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValueSet("trace_level", "")) + return p +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (p *ProcedureJavaResourceAssert) HasArgumentsNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("arguments")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasCommentNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("comment")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasDatabaseNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("database")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasEnableConsoleOutputNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("enable_console_output")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasExecuteAsNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("execute_as")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasExternalAccessIntegrationsNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("external_access_integrations")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasFullyQualifiedNameNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasHandlerNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("handler")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasImportsNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("imports")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasIsSecureNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("is_secure")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasLogLevelNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("log_level")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasMetricLevelNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("metric_level")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasNameNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("name")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasNullInputBehaviorNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("null_input_behavior")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasPackagesNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("packages")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasProcedureDefinitionNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("procedure_definition")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasProcedureLanguageNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("procedure_language")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasReturnTypeNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("return_type")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasRuntimeVersionNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("runtime_version")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasSchemaNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("schema")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasSecretsNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("secrets")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasSnowparkPackageNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("snowpark_package")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasTargetPathNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("target_path")) + return p +} + +func (p *ProcedureJavaResourceAssert) HasTraceLevelNotEmpty() *ProcedureJavaResourceAssert { + p.AddAssertion(assert.ValuePresent("trace_level")) + return p +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_javascript_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_javascript_resource_gen.go index 2539011ad4..6ff27c6a30 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_javascript_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_javascript_resource_gen.go @@ -112,12 +112,12 @@ func (p *ProcedureJavascriptResourceAssert) HasTraceLevelString(expected string) return p } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (p *ProcedureJavascriptResourceAssert) HasNoArguments() *ProcedureJavascriptResourceAssert { - p.AddAssertion(assert.ValueNotSet("arguments")) + p.AddAssertion(assert.ValueSet("arguments.#", "0")) return p } @@ -195,3 +195,148 @@ func (p *ProcedureJavascriptResourceAssert) HasNoTraceLevel() *ProcedureJavascri p.AddAssertion(assert.ValueNotSet("trace_level")) return p } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (p *ProcedureJavascriptResourceAssert) HasCommentEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("comment", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasDatabaseEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("database", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasExecuteAsEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("execute_as", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasFullyQualifiedNameEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasIsSecureEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("is_secure", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasLogLevelEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("log_level", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasMetricLevelEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("metric_level", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasNameEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("name", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasNullInputBehaviorEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("null_input_behavior", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasProcedureDefinitionEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("procedure_definition", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasProcedureLanguageEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("procedure_language", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasReturnTypeEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("return_type", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasSchemaEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("schema", "")) + return p +} +func (p *ProcedureJavascriptResourceAssert) HasTraceLevelEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValueSet("trace_level", "")) + return p +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (p *ProcedureJavascriptResourceAssert) HasArgumentsNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("arguments")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasCommentNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("comment")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasDatabaseNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("database")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasEnableConsoleOutputNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("enable_console_output")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasExecuteAsNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("execute_as")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasFullyQualifiedNameNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasIsSecureNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("is_secure")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasLogLevelNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("log_level")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasMetricLevelNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("metric_level")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasNameNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("name")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasNullInputBehaviorNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("null_input_behavior")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasProcedureDefinitionNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("procedure_definition")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasProcedureLanguageNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("procedure_language")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasReturnTypeNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("return_type")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasSchemaNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("schema")) + return p +} + +func (p *ProcedureJavascriptResourceAssert) HasTraceLevelNotEmpty() *ProcedureJavascriptResourceAssert { + p.AddAssertion(assert.ValuePresent("trace_level")) + return p +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_python_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_python_resource_gen.go index 119c04708c..0cb26392d8 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_python_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_python_resource_gen.go @@ -147,12 +147,12 @@ func (p *ProcedurePythonResourceAssert) HasTraceLevelString(expected string) *Pr return p } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (p *ProcedurePythonResourceAssert) HasNoArguments() *ProcedurePythonResourceAssert { - p.AddAssertion(assert.ValueNotSet("arguments")) + p.AddAssertion(assert.ValueSet("arguments.#", "0")) return p } @@ -177,7 +177,7 @@ func (p *ProcedurePythonResourceAssert) HasNoExecuteAs() *ProcedurePythonResourc } func (p *ProcedurePythonResourceAssert) HasNoExternalAccessIntegrations() *ProcedurePythonResourceAssert { - p.AddAssertion(assert.ValueNotSet("external_access_integrations")) + p.AddAssertion(assert.ValueSet("external_access_integrations.#", "0")) return p } @@ -192,7 +192,7 @@ func (p *ProcedurePythonResourceAssert) HasNoHandler() *ProcedurePythonResourceA } func (p *ProcedurePythonResourceAssert) HasNoImports() *ProcedurePythonResourceAssert { - p.AddAssertion(assert.ValueNotSet("imports")) + p.AddAssertion(assert.ValueSet("imports.#", "0")) return p } @@ -222,7 +222,7 @@ func (p *ProcedurePythonResourceAssert) HasNoNullInputBehavior() *ProcedurePytho } func (p *ProcedurePythonResourceAssert) HasNoPackages() *ProcedurePythonResourceAssert { - p.AddAssertion(assert.ValueNotSet("packages")) + p.AddAssertion(assert.ValueSet("packages.#", "0")) return p } @@ -252,7 +252,7 @@ func (p *ProcedurePythonResourceAssert) HasNoSchema() *ProcedurePythonResourceAs } func (p *ProcedurePythonResourceAssert) HasNoSecrets() *ProcedurePythonResourceAssert { - p.AddAssertion(assert.ValueNotSet("secrets")) + p.AddAssertion(assert.ValueSet("secrets.#", "0")) return p } @@ -265,3 +265,195 @@ func (p *ProcedurePythonResourceAssert) HasNoTraceLevel() *ProcedurePythonResour p.AddAssertion(assert.ValueNotSet("trace_level")) return p } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (p *ProcedurePythonResourceAssert) HasCommentEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("comment", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasDatabaseEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("database", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasExecuteAsEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("execute_as", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasFullyQualifiedNameEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasHandlerEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("handler", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasIsSecureEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("is_secure", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasLogLevelEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("log_level", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasMetricLevelEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("metric_level", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasNameEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("name", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasNullInputBehaviorEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("null_input_behavior", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasProcedureDefinitionEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("procedure_definition", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasProcedureLanguageEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("procedure_language", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasReturnTypeEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("return_type", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasRuntimeVersionEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("runtime_version", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasSchemaEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("schema", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasSnowparkPackageEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("snowpark_package", "")) + return p +} +func (p *ProcedurePythonResourceAssert) HasTraceLevelEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValueSet("trace_level", "")) + return p +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (p *ProcedurePythonResourceAssert) HasArgumentsNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("arguments")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasCommentNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("comment")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasDatabaseNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("database")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasEnableConsoleOutputNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("enable_console_output")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasExecuteAsNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("execute_as")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasExternalAccessIntegrationsNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("external_access_integrations")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasFullyQualifiedNameNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasHandlerNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("handler")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasImportsNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("imports")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasIsSecureNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("is_secure")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasLogLevelNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("log_level")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasMetricLevelNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("metric_level")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasNameNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("name")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasNullInputBehaviorNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("null_input_behavior")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasPackagesNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("packages")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasProcedureDefinitionNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("procedure_definition")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasProcedureLanguageNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("procedure_language")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasReturnTypeNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("return_type")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasRuntimeVersionNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("runtime_version")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasSchemaNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("schema")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasSecretsNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("secrets")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasSnowparkPackageNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("snowpark_package")) + return p +} + +func (p *ProcedurePythonResourceAssert) HasTraceLevelNotEmpty() *ProcedurePythonResourceAssert { + p.AddAssertion(assert.ValuePresent("trace_level")) + return p +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_scala_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_scala_resource_gen.go index e668adf41e..3eb02ab2b5 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_scala_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_scala_resource_gen.go @@ -152,12 +152,12 @@ func (p *ProcedureScalaResourceAssert) HasTraceLevelString(expected string) *Pro return p } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (p *ProcedureScalaResourceAssert) HasNoArguments() *ProcedureScalaResourceAssert { - p.AddAssertion(assert.ValueNotSet("arguments")) + p.AddAssertion(assert.ValueSet("arguments.#", "0")) return p } @@ -182,7 +182,7 @@ func (p *ProcedureScalaResourceAssert) HasNoExecuteAs() *ProcedureScalaResourceA } func (p *ProcedureScalaResourceAssert) HasNoExternalAccessIntegrations() *ProcedureScalaResourceAssert { - p.AddAssertion(assert.ValueNotSet("external_access_integrations")) + p.AddAssertion(assert.ValueSet("external_access_integrations.#", "0")) return p } @@ -197,7 +197,7 @@ func (p *ProcedureScalaResourceAssert) HasNoHandler() *ProcedureScalaResourceAss } func (p *ProcedureScalaResourceAssert) HasNoImports() *ProcedureScalaResourceAssert { - p.AddAssertion(assert.ValueNotSet("imports")) + p.AddAssertion(assert.ValueSet("imports.#", "0")) return p } @@ -227,7 +227,7 @@ func (p *ProcedureScalaResourceAssert) HasNoNullInputBehavior() *ProcedureScalaR } func (p *ProcedureScalaResourceAssert) HasNoPackages() *ProcedureScalaResourceAssert { - p.AddAssertion(assert.ValueNotSet("packages")) + p.AddAssertion(assert.ValueSet("packages.#", "0")) return p } @@ -257,7 +257,7 @@ func (p *ProcedureScalaResourceAssert) HasNoSchema() *ProcedureScalaResourceAsse } func (p *ProcedureScalaResourceAssert) HasNoSecrets() *ProcedureScalaResourceAssert { - p.AddAssertion(assert.ValueNotSet("secrets")) + p.AddAssertion(assert.ValueSet("secrets.#", "0")) return p } @@ -267,7 +267,7 @@ func (p *ProcedureScalaResourceAssert) HasNoSnowparkPackage() *ProcedureScalaRes } func (p *ProcedureScalaResourceAssert) HasNoTargetPath() *ProcedureScalaResourceAssert { - p.AddAssertion(assert.ValueNotSet("target_path")) + p.AddAssertion(assert.ValueSet("target_path.#", "0")) return p } @@ -275,3 +275,200 @@ func (p *ProcedureScalaResourceAssert) HasNoTraceLevel() *ProcedureScalaResource p.AddAssertion(assert.ValueNotSet("trace_level")) return p } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (p *ProcedureScalaResourceAssert) HasCommentEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("comment", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasDatabaseEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("database", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasExecuteAsEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("execute_as", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasFullyQualifiedNameEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasHandlerEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("handler", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasIsSecureEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("is_secure", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasLogLevelEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("log_level", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasMetricLevelEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("metric_level", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasNameEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("name", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasNullInputBehaviorEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("null_input_behavior", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasProcedureDefinitionEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("procedure_definition", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasProcedureLanguageEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("procedure_language", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasReturnTypeEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("return_type", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasRuntimeVersionEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("runtime_version", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasSchemaEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("schema", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasSnowparkPackageEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("snowpark_package", "")) + return p +} +func (p *ProcedureScalaResourceAssert) HasTraceLevelEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValueSet("trace_level", "")) + return p +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (p *ProcedureScalaResourceAssert) HasArgumentsNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("arguments")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasCommentNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("comment")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasDatabaseNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("database")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasEnableConsoleOutputNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("enable_console_output")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasExecuteAsNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("execute_as")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasExternalAccessIntegrationsNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("external_access_integrations")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasFullyQualifiedNameNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasHandlerNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("handler")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasImportsNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("imports")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasIsSecureNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("is_secure")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasLogLevelNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("log_level")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasMetricLevelNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("metric_level")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasNameNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("name")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasNullInputBehaviorNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("null_input_behavior")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasPackagesNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("packages")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasProcedureDefinitionNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("procedure_definition")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasProcedureLanguageNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("procedure_language")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasReturnTypeNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("return_type")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasRuntimeVersionNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("runtime_version")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasSchemaNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("schema")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasSecretsNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("secrets")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasSnowparkPackageNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("snowpark_package")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasTargetPathNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("target_path")) + return p +} + +func (p *ProcedureScalaResourceAssert) HasTraceLevelNotEmpty() *ProcedureScalaResourceAssert { + p.AddAssertion(assert.ValuePresent("trace_level")) + return p +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_sql_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_sql_resource_gen.go index 6beb382c31..c0942da49c 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_sql_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/procedure_sql_resource_gen.go @@ -112,12 +112,12 @@ func (p *ProcedureSqlResourceAssert) HasTraceLevelString(expected string) *Proce return p } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (p *ProcedureSqlResourceAssert) HasNoArguments() *ProcedureSqlResourceAssert { - p.AddAssertion(assert.ValueNotSet("arguments")) + p.AddAssertion(assert.ValueSet("arguments.#", "0")) return p } @@ -195,3 +195,148 @@ func (p *ProcedureSqlResourceAssert) HasNoTraceLevel() *ProcedureSqlResourceAsse p.AddAssertion(assert.ValueNotSet("trace_level")) return p } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (p *ProcedureSqlResourceAssert) HasCommentEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("comment", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasDatabaseEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("database", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasExecuteAsEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("execute_as", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasFullyQualifiedNameEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasIsSecureEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("is_secure", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasLogLevelEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("log_level", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasMetricLevelEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("metric_level", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasNameEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("name", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasNullInputBehaviorEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("null_input_behavior", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasProcedureDefinitionEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("procedure_definition", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasProcedureLanguageEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("procedure_language", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasReturnTypeEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("return_type", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasSchemaEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("schema", "")) + return p +} +func (p *ProcedureSqlResourceAssert) HasTraceLevelEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValueSet("trace_level", "")) + return p +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (p *ProcedureSqlResourceAssert) HasArgumentsNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("arguments")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasCommentNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("comment")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasDatabaseNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("database")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasEnableConsoleOutputNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("enable_console_output")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasExecuteAsNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("execute_as")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasFullyQualifiedNameNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasIsSecureNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("is_secure")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasLogLevelNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("log_level")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasMetricLevelNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("metric_level")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasNameNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("name")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasNullInputBehaviorNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("null_input_behavior")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasProcedureDefinitionNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("procedure_definition")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasProcedureLanguageNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("procedure_language")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasReturnTypeNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("return_type")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasSchemaNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("schema")) + return p +} + +func (p *ProcedureSqlResourceAssert) HasTraceLevelNotEmpty() *ProcedureSqlResourceAssert { + p.AddAssertion(assert.ValuePresent("trace_level")) + return p +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/resource_monitor_resource_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/resource_monitor_resource_ext.go index 3fcbca3865..d5087022ad 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/resource_monitor_resource_ext.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/resource_monitor_resource_ext.go @@ -7,16 +7,6 @@ import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/bettertestspoc/assert" ) -func (r *ResourceMonitorResourceAssert) HasStartTimestampNotEmpty() *ResourceMonitorResourceAssert { - r.AddAssertion(assert.ValuePresent("start_timestamp")) - return r -} - -func (r *ResourceMonitorResourceAssert) HasEndTimestampNotEmpty() *ResourceMonitorResourceAssert { - r.AddAssertion(assert.ValuePresent("end_timestamp")) - return r -} - func (r *ResourceMonitorResourceAssert) HasNotifyUsersLen(len int) *ResourceMonitorResourceAssert { r.AddAssertion(assert.ValueSet("notify_users.#", strconv.FormatInt(int64(len), 10))) return r diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/resource_monitor_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/resource_monitor_resource_gen.go index 343aec7bfb..513c242816 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/resource_monitor_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/resource_monitor_resource_gen.go @@ -82,9 +82,9 @@ func (r *ResourceMonitorResourceAssert) HasSuspendTriggerString(expected string) return r } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (r *ResourceMonitorResourceAssert) HasNoCreditQuota() *ResourceMonitorResourceAssert { r.AddAssertion(assert.ValueNotSet("credit_quota")) @@ -112,12 +112,12 @@ func (r *ResourceMonitorResourceAssert) HasNoName() *ResourceMonitorResourceAsse } func (r *ResourceMonitorResourceAssert) HasNoNotifyTriggers() *ResourceMonitorResourceAssert { - r.AddAssertion(assert.ValueNotSet("notify_triggers")) + r.AddAssertion(assert.ValueSet("notify_triggers.#", "0")) return r } func (r *ResourceMonitorResourceAssert) HasNoNotifyUsers() *ResourceMonitorResourceAssert { - r.AddAssertion(assert.ValueNotSet("notify_users")) + r.AddAssertion(assert.ValueSet("notify_users.#", "0")) return r } @@ -135,3 +135,82 @@ func (r *ResourceMonitorResourceAssert) HasNoSuspendTrigger() *ResourceMonitorRe r.AddAssertion(assert.ValueNotSet("suspend_trigger")) return r } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (r *ResourceMonitorResourceAssert) HasEndTimestampEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValueSet("end_timestamp", "")) + return r +} +func (r *ResourceMonitorResourceAssert) HasFrequencyEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValueSet("frequency", "")) + return r +} +func (r *ResourceMonitorResourceAssert) HasFullyQualifiedNameEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return r +} +func (r *ResourceMonitorResourceAssert) HasNameEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValueSet("name", "")) + return r +} +func (r *ResourceMonitorResourceAssert) HasStartTimestampEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValueSet("start_timestamp", "")) + return r +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (r *ResourceMonitorResourceAssert) HasCreditQuotaNotEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValuePresent("credit_quota")) + return r +} + +func (r *ResourceMonitorResourceAssert) HasEndTimestampNotEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValuePresent("end_timestamp")) + return r +} + +func (r *ResourceMonitorResourceAssert) HasFrequencyNotEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValuePresent("frequency")) + return r +} + +func (r *ResourceMonitorResourceAssert) HasFullyQualifiedNameNotEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return r +} + +func (r *ResourceMonitorResourceAssert) HasNameNotEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValuePresent("name")) + return r +} + +func (r *ResourceMonitorResourceAssert) HasNotifyTriggersNotEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValuePresent("notify_triggers")) + return r +} + +func (r *ResourceMonitorResourceAssert) HasNotifyUsersNotEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValuePresent("notify_users")) + return r +} + +func (r *ResourceMonitorResourceAssert) HasStartTimestampNotEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValuePresent("start_timestamp")) + return r +} + +func (r *ResourceMonitorResourceAssert) HasSuspendImmediateTriggerNotEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValuePresent("suspend_immediate_trigger")) + return r +} + +func (r *ResourceMonitorResourceAssert) HasSuspendTriggerNotEmpty() *ResourceMonitorResourceAssert { + r.AddAssertion(assert.ValuePresent("suspend_trigger")) + return r +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/row_access_policy_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/row_access_policy_resource_gen.go index a73404790b..bc2ba29076 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/row_access_policy_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/row_access_policy_resource_gen.go @@ -67,12 +67,12 @@ func (r *RowAccessPolicyResourceAssert) HasSchemaString(expected string) *RowAcc return r } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (r *RowAccessPolicyResourceAssert) HasNoArgument() *RowAccessPolicyResourceAssert { - r.AddAssertion(assert.ValueNotSet("argument")) + r.AddAssertion(assert.ValueSet("argument.#", "0")) return r } @@ -105,3 +105,71 @@ func (r *RowAccessPolicyResourceAssert) HasNoSchema() *RowAccessPolicyResourceAs r.AddAssertion(assert.ValueNotSet("schema")) return r } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (r *RowAccessPolicyResourceAssert) HasBodyEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValueSet("body", "")) + return r +} +func (r *RowAccessPolicyResourceAssert) HasCommentEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValueSet("comment", "")) + return r +} +func (r *RowAccessPolicyResourceAssert) HasDatabaseEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValueSet("database", "")) + return r +} +func (r *RowAccessPolicyResourceAssert) HasFullyQualifiedNameEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return r +} +func (r *RowAccessPolicyResourceAssert) HasNameEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValueSet("name", "")) + return r +} +func (r *RowAccessPolicyResourceAssert) HasSchemaEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValueSet("schema", "")) + return r +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (r *RowAccessPolicyResourceAssert) HasArgumentNotEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValuePresent("argument")) + return r +} + +func (r *RowAccessPolicyResourceAssert) HasBodyNotEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValuePresent("body")) + return r +} + +func (r *RowAccessPolicyResourceAssert) HasCommentNotEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValuePresent("comment")) + return r +} + +func (r *RowAccessPolicyResourceAssert) HasDatabaseNotEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValuePresent("database")) + return r +} + +func (r *RowAccessPolicyResourceAssert) HasFullyQualifiedNameNotEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return r +} + +func (r *RowAccessPolicyResourceAssert) HasNameNotEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValuePresent("name")) + return r +} + +func (r *RowAccessPolicyResourceAssert) HasSchemaNotEmpty() *RowAccessPolicyResourceAssert { + r.AddAssertion(assert.ValuePresent("schema")) + return r +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/schema_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/schema_resource_gen.go index f4249764f3..cea7781782 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/schema_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/schema_resource_gen.go @@ -147,9 +147,9 @@ func (s *SchemaResourceAssert) HasWithManagedAccessString(expected string) *Sche return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *SchemaResourceAssert) HasNoCatalog() *SchemaResourceAssert { s.AddAssertion(assert.ValueNotSet("catalog")) @@ -265,3 +265,179 @@ func (s *SchemaResourceAssert) HasNoWithManagedAccess() *SchemaResourceAssert { s.AddAssertion(assert.ValueNotSet("with_managed_access")) return s } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *SchemaResourceAssert) HasCatalogEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("catalog", "")) + return s +} +func (s *SchemaResourceAssert) HasCommentEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *SchemaResourceAssert) HasDatabaseEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("database", "")) + return s +} +func (s *SchemaResourceAssert) HasDefaultDdlCollationEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("default_ddl_collation", "")) + return s +} +func (s *SchemaResourceAssert) HasExternalVolumeEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("external_volume", "")) + return s +} +func (s *SchemaResourceAssert) HasFullyQualifiedNameEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *SchemaResourceAssert) HasIsTransientEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("is_transient", "")) + return s +} +func (s *SchemaResourceAssert) HasLogLevelEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("log_level", "")) + return s +} +func (s *SchemaResourceAssert) HasNameEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} +func (s *SchemaResourceAssert) HasStorageSerializationPolicyEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("storage_serialization_policy", "")) + return s +} +func (s *SchemaResourceAssert) HasTraceLevelEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("trace_level", "")) + return s +} +func (s *SchemaResourceAssert) HasUserTaskManagedInitialWarehouseSizeEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("user_task_managed_initial_warehouse_size", "")) + return s +} +func (s *SchemaResourceAssert) HasWithManagedAccessEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValueSet("with_managed_access", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *SchemaResourceAssert) HasCatalogNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("catalog")) + return s +} + +func (s *SchemaResourceAssert) HasCommentNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *SchemaResourceAssert) HasDataRetentionTimeInDaysNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("data_retention_time_in_days")) + return s +} + +func (s *SchemaResourceAssert) HasDatabaseNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("database")) + return s +} + +func (s *SchemaResourceAssert) HasDefaultDdlCollationNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("default_ddl_collation")) + return s +} + +func (s *SchemaResourceAssert) HasEnableConsoleOutputNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("enable_console_output")) + return s +} + +func (s *SchemaResourceAssert) HasExternalVolumeNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("external_volume")) + return s +} + +func (s *SchemaResourceAssert) HasFullyQualifiedNameNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *SchemaResourceAssert) HasIsTransientNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("is_transient")) + return s +} + +func (s *SchemaResourceAssert) HasLogLevelNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("log_level")) + return s +} + +func (s *SchemaResourceAssert) HasMaxDataExtensionTimeInDaysNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("max_data_extension_time_in_days")) + return s +} + +func (s *SchemaResourceAssert) HasNameNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} + +func (s *SchemaResourceAssert) HasPipeExecutionPausedNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("pipe_execution_paused")) + return s +} + +func (s *SchemaResourceAssert) HasQuotedIdentifiersIgnoreCaseNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("quoted_identifiers_ignore_case")) + return s +} + +func (s *SchemaResourceAssert) HasReplaceInvalidCharactersNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("replace_invalid_characters")) + return s +} + +func (s *SchemaResourceAssert) HasStorageSerializationPolicyNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("storage_serialization_policy")) + return s +} + +func (s *SchemaResourceAssert) HasSuspendTaskAfterNumFailuresNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("suspend_task_after_num_failures")) + return s +} + +func (s *SchemaResourceAssert) HasTaskAutoRetryAttemptsNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("task_auto_retry_attempts")) + return s +} + +func (s *SchemaResourceAssert) HasTraceLevelNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("trace_level")) + return s +} + +func (s *SchemaResourceAssert) HasUserTaskManagedInitialWarehouseSizeNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("user_task_managed_initial_warehouse_size")) + return s +} + +func (s *SchemaResourceAssert) HasUserTaskMinimumTriggerIntervalInSecondsNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("user_task_minimum_trigger_interval_in_seconds")) + return s +} + +func (s *SchemaResourceAssert) HasUserTaskTimeoutMsNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("user_task_timeout_ms")) + return s +} + +func (s *SchemaResourceAssert) HasWithManagedAccessNotEmpty() *SchemaResourceAssert { + s.AddAssertion(assert.ValuePresent("with_managed_access")) + return s +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/secondary_connection_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/secondary_connection_resource_gen.go index 363cd9c804..cd16544db7 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/secondary_connection_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/secondary_connection_resource_gen.go @@ -57,9 +57,9 @@ func (s *SecondaryConnectionResourceAssert) HasNameString(expected string) *Seco return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *SecondaryConnectionResourceAssert) HasNoAsReplicaOf() *SecondaryConnectionResourceAssert { s.AddAssertion(assert.ValueNotSet("as_replica_of")) @@ -85,3 +85,53 @@ func (s *SecondaryConnectionResourceAssert) HasNoName() *SecondaryConnectionReso s.AddAssertion(assert.ValueNotSet("name")) return s } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *SecondaryConnectionResourceAssert) HasAsReplicaOfEmpty() *SecondaryConnectionResourceAssert { + s.AddAssertion(assert.ValueSet("as_replica_of", "")) + return s +} +func (s *SecondaryConnectionResourceAssert) HasCommentEmpty() *SecondaryConnectionResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *SecondaryConnectionResourceAssert) HasFullyQualifiedNameEmpty() *SecondaryConnectionResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *SecondaryConnectionResourceAssert) HasNameEmpty() *SecondaryConnectionResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *SecondaryConnectionResourceAssert) HasAsReplicaOfNotEmpty() *SecondaryConnectionResourceAssert { + s.AddAssertion(assert.ValuePresent("as_replica_of")) + return s +} + +func (s *SecondaryConnectionResourceAssert) HasCommentNotEmpty() *SecondaryConnectionResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *SecondaryConnectionResourceAssert) HasFullyQualifiedNameNotEmpty() *SecondaryConnectionResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *SecondaryConnectionResourceAssert) HasIsPrimaryNotEmpty() *SecondaryConnectionResourceAssert { + s.AddAssertion(assert.ValuePresent("is_primary")) + return s +} + +func (s *SecondaryConnectionResourceAssert) HasNameNotEmpty() *SecondaryConnectionResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_authorization_code_grant_resource_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_authorization_code_grant_resource_ext.go deleted file mode 100644 index e5da2b69e7..0000000000 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_authorization_code_grant_resource_ext.go +++ /dev/null @@ -1,10 +0,0 @@ -package resourceassert - -import ( - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/bettertestspoc/assert" -) - -func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasOauthRefreshTokenExpiryTimeNotEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { - s.AddAssertion(assert.ValuePresent("oauth_refresh_token_expiry_time")) - return s -} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_authorization_code_grant_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_authorization_code_grant_resource_gen.go index 45684561ab..d57542d79a 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_authorization_code_grant_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_authorization_code_grant_resource_gen.go @@ -77,9 +77,9 @@ func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasSecretTypeString(exp return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasNoApiAuthentication() *SecretWithAuthorizationCodeGrantResourceAssert { s.AddAssertion(assert.ValueNotSet("api_authentication")) @@ -125,3 +125,93 @@ func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasNoSecretType() *Secr s.AddAssertion(assert.ValueNotSet("secret_type")) return s } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasApiAuthenticationEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValueSet("api_authentication", "")) + return s +} +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasCommentEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasDatabaseEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValueSet("database", "")) + return s +} +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasFullyQualifiedNameEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasNameEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasOauthRefreshTokenEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValueSet("oauth_refresh_token", "")) + return s +} +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasOauthRefreshTokenExpiryTimeEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValueSet("oauth_refresh_token_expiry_time", "")) + return s +} +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasSchemaEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValueSet("schema", "")) + return s +} +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasSecretTypeEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValueSet("secret_type", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasApiAuthenticationNotEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValuePresent("api_authentication")) + return s +} + +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasCommentNotEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasDatabaseNotEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValuePresent("database")) + return s +} + +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasFullyQualifiedNameNotEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasNameNotEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} + +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasOauthRefreshTokenNotEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValuePresent("oauth_refresh_token")) + return s +} + +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasOauthRefreshTokenExpiryTimeNotEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValuePresent("oauth_refresh_token_expiry_time")) + return s +} + +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasSchemaNotEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValuePresent("schema")) + return s +} + +func (s *SecretWithAuthorizationCodeGrantResourceAssert) HasSecretTypeNotEmpty() *SecretWithAuthorizationCodeGrantResourceAssert { + s.AddAssertion(assert.ValuePresent("secret_type")) + return s +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_basic_authentication_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_basic_authentication_resource_gen.go index 5c638a4a09..320a6f5039 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_basic_authentication_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_basic_authentication_resource_gen.go @@ -72,9 +72,9 @@ func (s *SecretWithBasicAuthenticationResourceAssert) HasUsernameString(expected return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *SecretWithBasicAuthenticationResourceAssert) HasNoComment() *SecretWithBasicAuthenticationResourceAssert { s.AddAssertion(assert.ValueNotSet("comment")) @@ -115,3 +115,84 @@ func (s *SecretWithBasicAuthenticationResourceAssert) HasNoUsername() *SecretWit s.AddAssertion(assert.ValueNotSet("username")) return s } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *SecretWithBasicAuthenticationResourceAssert) HasCommentEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *SecretWithBasicAuthenticationResourceAssert) HasDatabaseEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValueSet("database", "")) + return s +} +func (s *SecretWithBasicAuthenticationResourceAssert) HasFullyQualifiedNameEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *SecretWithBasicAuthenticationResourceAssert) HasNameEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} +func (s *SecretWithBasicAuthenticationResourceAssert) HasPasswordEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValueSet("password", "")) + return s +} +func (s *SecretWithBasicAuthenticationResourceAssert) HasSchemaEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValueSet("schema", "")) + return s +} +func (s *SecretWithBasicAuthenticationResourceAssert) HasSecretTypeEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValueSet("secret_type", "")) + return s +} +func (s *SecretWithBasicAuthenticationResourceAssert) HasUsernameEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValueSet("username", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *SecretWithBasicAuthenticationResourceAssert) HasCommentNotEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *SecretWithBasicAuthenticationResourceAssert) HasDatabaseNotEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValuePresent("database")) + return s +} + +func (s *SecretWithBasicAuthenticationResourceAssert) HasFullyQualifiedNameNotEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *SecretWithBasicAuthenticationResourceAssert) HasNameNotEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} + +func (s *SecretWithBasicAuthenticationResourceAssert) HasPasswordNotEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValuePresent("password")) + return s +} + +func (s *SecretWithBasicAuthenticationResourceAssert) HasSchemaNotEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValuePresent("schema")) + return s +} + +func (s *SecretWithBasicAuthenticationResourceAssert) HasSecretTypeNotEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValuePresent("secret_type")) + return s +} + +func (s *SecretWithBasicAuthenticationResourceAssert) HasUsernameNotEmpty() *SecretWithBasicAuthenticationResourceAssert { + s.AddAssertion(assert.ValuePresent("username")) + return s +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_client_credentials_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_client_credentials_resource_gen.go index 68aaded5df..6b0d2edaf3 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_client_credentials_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_client_credentials_resource_gen.go @@ -72,9 +72,9 @@ func (s *SecretWithClientCredentialsResourceAssert) HasSecretTypeString(expected return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *SecretWithClientCredentialsResourceAssert) HasNoApiAuthentication() *SecretWithClientCredentialsResourceAssert { s.AddAssertion(assert.ValueNotSet("api_authentication")) @@ -102,7 +102,7 @@ func (s *SecretWithClientCredentialsResourceAssert) HasNoName() *SecretWithClien } func (s *SecretWithClientCredentialsResourceAssert) HasNoOauthScopes() *SecretWithClientCredentialsResourceAssert { - s.AddAssertion(assert.ValueNotSet("oauth_scopes")) + s.AddAssertion(assert.ValueSet("oauth_scopes.#", "0")) return s } @@ -115,3 +115,80 @@ func (s *SecretWithClientCredentialsResourceAssert) HasNoSecretType() *SecretWit s.AddAssertion(assert.ValueNotSet("secret_type")) return s } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *SecretWithClientCredentialsResourceAssert) HasApiAuthenticationEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValueSet("api_authentication", "")) + return s +} +func (s *SecretWithClientCredentialsResourceAssert) HasCommentEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *SecretWithClientCredentialsResourceAssert) HasDatabaseEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValueSet("database", "")) + return s +} +func (s *SecretWithClientCredentialsResourceAssert) HasFullyQualifiedNameEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *SecretWithClientCredentialsResourceAssert) HasNameEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} +func (s *SecretWithClientCredentialsResourceAssert) HasSchemaEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValueSet("schema", "")) + return s +} +func (s *SecretWithClientCredentialsResourceAssert) HasSecretTypeEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValueSet("secret_type", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *SecretWithClientCredentialsResourceAssert) HasApiAuthenticationNotEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValuePresent("api_authentication")) + return s +} + +func (s *SecretWithClientCredentialsResourceAssert) HasCommentNotEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *SecretWithClientCredentialsResourceAssert) HasDatabaseNotEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValuePresent("database")) + return s +} + +func (s *SecretWithClientCredentialsResourceAssert) HasFullyQualifiedNameNotEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *SecretWithClientCredentialsResourceAssert) HasNameNotEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} + +func (s *SecretWithClientCredentialsResourceAssert) HasOauthScopesNotEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValuePresent("oauth_scopes")) + return s +} + +func (s *SecretWithClientCredentialsResourceAssert) HasSchemaNotEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValuePresent("schema")) + return s +} + +func (s *SecretWithClientCredentialsResourceAssert) HasSecretTypeNotEmpty() *SecretWithClientCredentialsResourceAssert { + s.AddAssertion(assert.ValuePresent("secret_type")) + return s +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_generic_string_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_generic_string_resource_gen.go index 259dd6dab0..f96e377a26 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_generic_string_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/secret_with_generic_string_resource_gen.go @@ -67,9 +67,9 @@ func (s *SecretWithGenericStringResourceAssert) HasSecretTypeString(expected str return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *SecretWithGenericStringResourceAssert) HasNoComment() *SecretWithGenericStringResourceAssert { s.AddAssertion(assert.ValueNotSet("comment")) @@ -105,3 +105,75 @@ func (s *SecretWithGenericStringResourceAssert) HasNoSecretType() *SecretWithGen s.AddAssertion(assert.ValueNotSet("secret_type")) return s } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *SecretWithGenericStringResourceAssert) HasCommentEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *SecretWithGenericStringResourceAssert) HasDatabaseEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValueSet("database", "")) + return s +} +func (s *SecretWithGenericStringResourceAssert) HasFullyQualifiedNameEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *SecretWithGenericStringResourceAssert) HasNameEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} +func (s *SecretWithGenericStringResourceAssert) HasSchemaEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValueSet("schema", "")) + return s +} +func (s *SecretWithGenericStringResourceAssert) HasSecretStringEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValueSet("secret_string", "")) + return s +} +func (s *SecretWithGenericStringResourceAssert) HasSecretTypeEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValueSet("secret_type", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *SecretWithGenericStringResourceAssert) HasCommentNotEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *SecretWithGenericStringResourceAssert) HasDatabaseNotEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValuePresent("database")) + return s +} + +func (s *SecretWithGenericStringResourceAssert) HasFullyQualifiedNameNotEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *SecretWithGenericStringResourceAssert) HasNameNotEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} + +func (s *SecretWithGenericStringResourceAssert) HasSchemaNotEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValuePresent("schema")) + return s +} + +func (s *SecretWithGenericStringResourceAssert) HasSecretStringNotEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValuePresent("secret_string")) + return s +} + +func (s *SecretWithGenericStringResourceAssert) HasSecretTypeNotEmpty() *SecretWithGenericStringResourceAssert { + s.AddAssertion(assert.ValuePresent("secret_type")) + return s +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/service_user_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/service_user_resource_gen.go index 3fa43f7363..816808bf4b 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/service_user_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/service_user_resource_gen.go @@ -402,9 +402,9 @@ func (s *ServiceUserResourceAssert) HasWeekStartString(expected string) *Service return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *ServiceUserResourceAssert) HasNoAbortDetachedQuery() *ServiceUserResourceAssert { s.AddAssertion(assert.ValueNotSet("abort_detached_query")) @@ -775,3 +775,538 @@ func (s *ServiceUserResourceAssert) HasNoWeekStart() *ServiceUserResourceAssert s.AddAssertion(assert.ValueNotSet("week_start")) return s } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *ServiceUserResourceAssert) HasBinaryInputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("binary_input_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasBinaryOutputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("binary_output_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasClientTimestampTypeMappingEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("client_timestamp_type_mapping", "")) + return s +} +func (s *ServiceUserResourceAssert) HasCommentEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *ServiceUserResourceAssert) HasDateInputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("date_input_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasDateOutputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("date_output_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasDefaultNamespaceEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("default_namespace", "")) + return s +} +func (s *ServiceUserResourceAssert) HasDefaultRoleEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("default_role", "")) + return s +} +func (s *ServiceUserResourceAssert) HasDefaultSecondaryRolesOptionEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("default_secondary_roles_option", "")) + return s +} +func (s *ServiceUserResourceAssert) HasDefaultWarehouseEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("default_warehouse", "")) + return s +} +func (s *ServiceUserResourceAssert) HasDisabledEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("disabled", "")) + return s +} +func (s *ServiceUserResourceAssert) HasDisplayNameEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("display_name", "")) + return s +} +func (s *ServiceUserResourceAssert) HasEmailEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("email", "")) + return s +} +func (s *ServiceUserResourceAssert) HasFullyQualifiedNameEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *ServiceUserResourceAssert) HasGeographyOutputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("geography_output_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasGeometryOutputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("geometry_output_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasLogLevelEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("log_level", "")) + return s +} +func (s *ServiceUserResourceAssert) HasLoginNameEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("login_name", "")) + return s +} +func (s *ServiceUserResourceAssert) HasNameEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} +func (s *ServiceUserResourceAssert) HasNetworkPolicyEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("network_policy", "")) + return s +} +func (s *ServiceUserResourceAssert) HasQueryTagEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("query_tag", "")) + return s +} +func (s *ServiceUserResourceAssert) HasRsaPublicKeyEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("rsa_public_key", "")) + return s +} +func (s *ServiceUserResourceAssert) HasRsaPublicKey2Empty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("rsa_public_key_2", "")) + return s +} +func (s *ServiceUserResourceAssert) HasS3StageVpceDnsNameEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("s3_stage_vpce_dns_name", "")) + return s +} +func (s *ServiceUserResourceAssert) HasSearchPathEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("search_path", "")) + return s +} +func (s *ServiceUserResourceAssert) HasSimulatedDataSharingConsumerEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("simulated_data_sharing_consumer", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTimeInputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("time_input_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTimeOutputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("time_output_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTimestampInputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("timestamp_input_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTimestampLtzOutputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("timestamp_ltz_output_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTimestampNtzOutputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("timestamp_ntz_output_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTimestampOutputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("timestamp_output_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTimestampTypeMappingEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("timestamp_type_mapping", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTimestampTzOutputFormatEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("timestamp_tz_output_format", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTimezoneEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("timezone", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTraceLevelEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("trace_level", "")) + return s +} +func (s *ServiceUserResourceAssert) HasTransactionDefaultIsolationLevelEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("transaction_default_isolation_level", "")) + return s +} +func (s *ServiceUserResourceAssert) HasUnsupportedDdlActionEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("unsupported_ddl_action", "")) + return s +} +func (s *ServiceUserResourceAssert) HasUserTypeEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValueSet("user_type", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *ServiceUserResourceAssert) HasAbortDetachedQueryNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("abort_detached_query")) + return s +} + +func (s *ServiceUserResourceAssert) HasAutocommitNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("autocommit")) + return s +} + +func (s *ServiceUserResourceAssert) HasBinaryInputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("binary_input_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasBinaryOutputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("binary_output_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasClientMemoryLimitNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("client_memory_limit")) + return s +} + +func (s *ServiceUserResourceAssert) HasClientMetadataRequestUseConnectionCtxNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("client_metadata_request_use_connection_ctx")) + return s +} + +func (s *ServiceUserResourceAssert) HasClientPrefetchThreadsNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("client_prefetch_threads")) + return s +} + +func (s *ServiceUserResourceAssert) HasClientResultChunkSizeNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("client_result_chunk_size")) + return s +} + +func (s *ServiceUserResourceAssert) HasClientResultColumnCaseInsensitiveNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("client_result_column_case_insensitive")) + return s +} + +func (s *ServiceUserResourceAssert) HasClientSessionKeepAliveNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("client_session_keep_alive")) + return s +} + +func (s *ServiceUserResourceAssert) HasClientSessionKeepAliveHeartbeatFrequencyNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("client_session_keep_alive_heartbeat_frequency")) + return s +} + +func (s *ServiceUserResourceAssert) HasClientTimestampTypeMappingNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("client_timestamp_type_mapping")) + return s +} + +func (s *ServiceUserResourceAssert) HasCommentNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *ServiceUserResourceAssert) HasDateInputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("date_input_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasDateOutputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("date_output_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasDaysToExpiryNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("days_to_expiry")) + return s +} + +func (s *ServiceUserResourceAssert) HasDefaultNamespaceNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("default_namespace")) + return s +} + +func (s *ServiceUserResourceAssert) HasDefaultRoleNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("default_role")) + return s +} + +func (s *ServiceUserResourceAssert) HasDefaultSecondaryRolesOptionNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("default_secondary_roles_option")) + return s +} + +func (s *ServiceUserResourceAssert) HasDefaultWarehouseNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("default_warehouse")) + return s +} + +func (s *ServiceUserResourceAssert) HasDisabledNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("disabled")) + return s +} + +func (s *ServiceUserResourceAssert) HasDisplayNameNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("display_name")) + return s +} + +func (s *ServiceUserResourceAssert) HasEmailNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("email")) + return s +} + +func (s *ServiceUserResourceAssert) HasEnableUnloadPhysicalTypeOptimizationNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("enable_unload_physical_type_optimization")) + return s +} + +func (s *ServiceUserResourceAssert) HasEnableUnredactedQuerySyntaxErrorNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("enable_unredacted_query_syntax_error")) + return s +} + +func (s *ServiceUserResourceAssert) HasErrorOnNondeterministicMergeNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("error_on_nondeterministic_merge")) + return s +} + +func (s *ServiceUserResourceAssert) HasErrorOnNondeterministicUpdateNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("error_on_nondeterministic_update")) + return s +} + +func (s *ServiceUserResourceAssert) HasFullyQualifiedNameNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *ServiceUserResourceAssert) HasGeographyOutputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("geography_output_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasGeometryOutputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("geometry_output_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasJdbcTreatDecimalAsIntNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("jdbc_treat_decimal_as_int")) + return s +} + +func (s *ServiceUserResourceAssert) HasJdbcTreatTimestampNtzAsUtcNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("jdbc_treat_timestamp_ntz_as_utc")) + return s +} + +func (s *ServiceUserResourceAssert) HasJdbcUseSessionTimezoneNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("jdbc_use_session_timezone")) + return s +} + +func (s *ServiceUserResourceAssert) HasJsonIndentNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("json_indent")) + return s +} + +func (s *ServiceUserResourceAssert) HasLockTimeoutNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("lock_timeout")) + return s +} + +func (s *ServiceUserResourceAssert) HasLogLevelNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("log_level")) + return s +} + +func (s *ServiceUserResourceAssert) HasLoginNameNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("login_name")) + return s +} + +func (s *ServiceUserResourceAssert) HasMinsToUnlockNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("mins_to_unlock")) + return s +} + +func (s *ServiceUserResourceAssert) HasMultiStatementCountNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("multi_statement_count")) + return s +} + +func (s *ServiceUserResourceAssert) HasNameNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} + +func (s *ServiceUserResourceAssert) HasNetworkPolicyNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("network_policy")) + return s +} + +func (s *ServiceUserResourceAssert) HasNoorderSequenceAsDefaultNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("noorder_sequence_as_default")) + return s +} + +func (s *ServiceUserResourceAssert) HasOdbcTreatDecimalAsIntNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("odbc_treat_decimal_as_int")) + return s +} + +func (s *ServiceUserResourceAssert) HasPreventUnloadToInternalStagesNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("prevent_unload_to_internal_stages")) + return s +} + +func (s *ServiceUserResourceAssert) HasQueryTagNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("query_tag")) + return s +} + +func (s *ServiceUserResourceAssert) HasQuotedIdentifiersIgnoreCaseNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("quoted_identifiers_ignore_case")) + return s +} + +func (s *ServiceUserResourceAssert) HasRowsPerResultsetNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("rows_per_resultset")) + return s +} + +func (s *ServiceUserResourceAssert) HasRsaPublicKeyNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("rsa_public_key")) + return s +} + +func (s *ServiceUserResourceAssert) HasRsaPublicKey2NotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("rsa_public_key_2")) + return s +} + +func (s *ServiceUserResourceAssert) HasS3StageVpceDnsNameNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("s3_stage_vpce_dns_name")) + return s +} + +func (s *ServiceUserResourceAssert) HasSearchPathNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("search_path")) + return s +} + +func (s *ServiceUserResourceAssert) HasSimulatedDataSharingConsumerNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("simulated_data_sharing_consumer")) + return s +} + +func (s *ServiceUserResourceAssert) HasStatementQueuedTimeoutInSecondsNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("statement_queued_timeout_in_seconds")) + return s +} + +func (s *ServiceUserResourceAssert) HasStatementTimeoutInSecondsNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("statement_timeout_in_seconds")) + return s +} + +func (s *ServiceUserResourceAssert) HasStrictJsonOutputNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("strict_json_output")) + return s +} + +func (s *ServiceUserResourceAssert) HasTimeInputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("time_input_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasTimeOutputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("time_output_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasTimestampDayIsAlways24hNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("timestamp_day_is_always_24h")) + return s +} + +func (s *ServiceUserResourceAssert) HasTimestampInputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("timestamp_input_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasTimestampLtzOutputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("timestamp_ltz_output_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasTimestampNtzOutputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("timestamp_ntz_output_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasTimestampOutputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("timestamp_output_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasTimestampTypeMappingNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("timestamp_type_mapping")) + return s +} + +func (s *ServiceUserResourceAssert) HasTimestampTzOutputFormatNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("timestamp_tz_output_format")) + return s +} + +func (s *ServiceUserResourceAssert) HasTimezoneNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("timezone")) + return s +} + +func (s *ServiceUserResourceAssert) HasTraceLevelNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("trace_level")) + return s +} + +func (s *ServiceUserResourceAssert) HasTransactionAbortOnErrorNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("transaction_abort_on_error")) + return s +} + +func (s *ServiceUserResourceAssert) HasTransactionDefaultIsolationLevelNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("transaction_default_isolation_level")) + return s +} + +func (s *ServiceUserResourceAssert) HasTwoDigitCenturyStartNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("two_digit_century_start")) + return s +} + +func (s *ServiceUserResourceAssert) HasUnsupportedDdlActionNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("unsupported_ddl_action")) + return s +} + +func (s *ServiceUserResourceAssert) HasUseCachedResultNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("use_cached_result")) + return s +} + +func (s *ServiceUserResourceAssert) HasUserTypeNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("user_type")) + return s +} + +func (s *ServiceUserResourceAssert) HasWeekOfYearPolicyNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("week_of_year_policy")) + return s +} + +func (s *ServiceUserResourceAssert) HasWeekStartNotEmpty() *ServiceUserResourceAssert { + s.AddAssertion(assert.ValuePresent("week_start")) + return s +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_directory_table_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_directory_table_resource_gen.go index f72e461915..1b54a85b7c 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_directory_table_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_directory_table_resource_gen.go @@ -72,9 +72,14 @@ func (s *StreamOnDirectoryTableResourceAssert) HasStaleString(expected string) * return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +func (s *StreamOnDirectoryTableResourceAssert) HasStreamTypeString(expected string) *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValueSet("stream_type", expected)) + return s +} + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *StreamOnDirectoryTableResourceAssert) HasNoComment() *StreamOnDirectoryTableResourceAssert { s.AddAssertion(assert.ValueNotSet("comment")) @@ -116,7 +121,89 @@ func (s *StreamOnDirectoryTableResourceAssert) HasNoStale() *StreamOnDirectoryTa return s } -func (s *StreamOnDirectoryTableResourceAssert) HasStreamTypeString(expected string) *StreamOnDirectoryTableResourceAssert { - s.AddAssertion(assert.ValueSet("stream_type", expected)) +func (s *StreamOnDirectoryTableResourceAssert) HasNoStreamType() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValueNotSet("stream_type")) + return s +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *StreamOnDirectoryTableResourceAssert) HasCommentEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *StreamOnDirectoryTableResourceAssert) HasDatabaseEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValueSet("database", "")) + return s +} +func (s *StreamOnDirectoryTableResourceAssert) HasFullyQualifiedNameEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *StreamOnDirectoryTableResourceAssert) HasNameEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} +func (s *StreamOnDirectoryTableResourceAssert) HasSchemaEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValueSet("schema", "")) + return s +} +func (s *StreamOnDirectoryTableResourceAssert) HasStageEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValueSet("stage", "")) + return s +} +func (s *StreamOnDirectoryTableResourceAssert) HasStreamTypeEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValueSet("stream_type", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *StreamOnDirectoryTableResourceAssert) HasCommentNotEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *StreamOnDirectoryTableResourceAssert) HasCopyGrantsNotEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValuePresent("copy_grants")) + return s +} + +func (s *StreamOnDirectoryTableResourceAssert) HasDatabaseNotEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValuePresent("database")) + return s +} + +func (s *StreamOnDirectoryTableResourceAssert) HasFullyQualifiedNameNotEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *StreamOnDirectoryTableResourceAssert) HasNameNotEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} + +func (s *StreamOnDirectoryTableResourceAssert) HasSchemaNotEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValuePresent("schema")) + return s +} + +func (s *StreamOnDirectoryTableResourceAssert) HasStageNotEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValuePresent("stage")) + return s +} + +func (s *StreamOnDirectoryTableResourceAssert) HasStaleNotEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValuePresent("stale")) + return s +} + +func (s *StreamOnDirectoryTableResourceAssert) HasStreamTypeNotEmpty() *StreamOnDirectoryTableResourceAssert { + s.AddAssertion(assert.ValuePresent("stream_type")) return s } diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_external_table_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_external_table_resource_gen.go index 6b61c0b45f..7a71ee9207 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_external_table_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_external_table_resource_gen.go @@ -87,17 +87,22 @@ func (s *StreamOnExternalTableResourceAssert) HasStaleString(expected string) *S return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +func (s *StreamOnExternalTableResourceAssert) HasStreamTypeString(expected string) *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValueSet("stream_type", expected)) + return s +} + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *StreamOnExternalTableResourceAssert) HasNoAt() *StreamOnExternalTableResourceAssert { - s.AddAssertion(assert.ValueNotSet("at")) + s.AddAssertion(assert.ValueSet("at.#", "0")) return s } func (s *StreamOnExternalTableResourceAssert) HasNoBefore() *StreamOnExternalTableResourceAssert { - s.AddAssertion(assert.ValueNotSet("before")) + s.AddAssertion(assert.ValueSet("before.#", "0")) return s } @@ -146,7 +151,108 @@ func (s *StreamOnExternalTableResourceAssert) HasNoStale() *StreamOnExternalTabl return s } -func (s *StreamOnExternalTableResourceAssert) HasStreamTypeString(expected string) *StreamOnExternalTableResourceAssert { - s.AddAssertion(assert.ValueSet("stream_type", expected)) +func (s *StreamOnExternalTableResourceAssert) HasNoStreamType() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValueNotSet("stream_type")) + return s +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *StreamOnExternalTableResourceAssert) HasCommentEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *StreamOnExternalTableResourceAssert) HasDatabaseEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValueSet("database", "")) + return s +} +func (s *StreamOnExternalTableResourceAssert) HasExternalTableEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValueSet("external_table", "")) + return s +} +func (s *StreamOnExternalTableResourceAssert) HasFullyQualifiedNameEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *StreamOnExternalTableResourceAssert) HasInsertOnlyEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValueSet("insert_only", "")) + return s +} +func (s *StreamOnExternalTableResourceAssert) HasNameEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} +func (s *StreamOnExternalTableResourceAssert) HasSchemaEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValueSet("schema", "")) + return s +} +func (s *StreamOnExternalTableResourceAssert) HasStreamTypeEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValueSet("stream_type", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *StreamOnExternalTableResourceAssert) HasAtNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("at")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasBeforeNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("before")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasCommentNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasCopyGrantsNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("copy_grants")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasDatabaseNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("database")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasExternalTableNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("external_table")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasFullyQualifiedNameNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasInsertOnlyNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("insert_only")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasNameNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasSchemaNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("schema")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasStaleNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("stale")) + return s +} + +func (s *StreamOnExternalTableResourceAssert) HasStreamTypeNotEmpty() *StreamOnExternalTableResourceAssert { + s.AddAssertion(assert.ValuePresent("stream_type")) return s } diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_table_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_table_resource_gen.go index e9fe89e6b8..b9d42c1447 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_table_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_table_resource_gen.go @@ -87,14 +87,19 @@ func (s *StreamOnTableResourceAssert) HasStaleString(expected string) *StreamOnT return s } +func (s *StreamOnTableResourceAssert) HasStreamTypeString(expected string) *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueSet("stream_type", expected)) + return s +} + func (s *StreamOnTableResourceAssert) HasTableString(expected string) *StreamOnTableResourceAssert { s.AddAssertion(assert.ValueSet("table", expected)) return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *StreamOnTableResourceAssert) HasNoAppendOnly() *StreamOnTableResourceAssert { s.AddAssertion(assert.ValueNotSet("append_only")) @@ -102,12 +107,12 @@ func (s *StreamOnTableResourceAssert) HasNoAppendOnly() *StreamOnTableResourceAs } func (s *StreamOnTableResourceAssert) HasNoAt() *StreamOnTableResourceAssert { - s.AddAssertion(assert.ValueNotSet("at")) + s.AddAssertion(assert.ValueSet("at.#", "0")) return s } func (s *StreamOnTableResourceAssert) HasNoBefore() *StreamOnTableResourceAssert { - s.AddAssertion(assert.ValueNotSet("before")) + s.AddAssertion(assert.ValueSet("before.#", "0")) return s } @@ -151,12 +156,122 @@ func (s *StreamOnTableResourceAssert) HasNoStale() *StreamOnTableResourceAssert return s } +func (s *StreamOnTableResourceAssert) HasNoStreamType() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueNotSet("stream_type")) + return s +} + func (s *StreamOnTableResourceAssert) HasNoTable() *StreamOnTableResourceAssert { s.AddAssertion(assert.ValueNotSet("table")) return s } -func (s *StreamOnTableResourceAssert) HasStreamTypeString(expected string) *StreamOnTableResourceAssert { - s.AddAssertion(assert.ValueSet("stream_type", expected)) +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *StreamOnTableResourceAssert) HasAppendOnlyEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueSet("append_only", "")) + return s +} +func (s *StreamOnTableResourceAssert) HasCommentEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *StreamOnTableResourceAssert) HasDatabaseEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueSet("database", "")) + return s +} +func (s *StreamOnTableResourceAssert) HasFullyQualifiedNameEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *StreamOnTableResourceAssert) HasNameEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} +func (s *StreamOnTableResourceAssert) HasSchemaEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueSet("schema", "")) + return s +} +func (s *StreamOnTableResourceAssert) HasShowInitialRowsEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueSet("show_initial_rows", "")) + return s +} +func (s *StreamOnTableResourceAssert) HasStreamTypeEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueSet("stream_type", "")) + return s +} +func (s *StreamOnTableResourceAssert) HasTableEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValueSet("table", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *StreamOnTableResourceAssert) HasAppendOnlyNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("append_only")) + return s +} + +func (s *StreamOnTableResourceAssert) HasAtNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("at")) + return s +} + +func (s *StreamOnTableResourceAssert) HasBeforeNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("before")) + return s +} + +func (s *StreamOnTableResourceAssert) HasCommentNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *StreamOnTableResourceAssert) HasCopyGrantsNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("copy_grants")) + return s +} + +func (s *StreamOnTableResourceAssert) HasDatabaseNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("database")) + return s +} + +func (s *StreamOnTableResourceAssert) HasFullyQualifiedNameNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *StreamOnTableResourceAssert) HasNameNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} + +func (s *StreamOnTableResourceAssert) HasSchemaNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("schema")) + return s +} + +func (s *StreamOnTableResourceAssert) HasShowInitialRowsNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("show_initial_rows")) + return s +} + +func (s *StreamOnTableResourceAssert) HasStaleNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("stale")) + return s +} + +func (s *StreamOnTableResourceAssert) HasStreamTypeNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("stream_type")) + return s +} + +func (s *StreamOnTableResourceAssert) HasTableNotEmpty() *StreamOnTableResourceAssert { + s.AddAssertion(assert.ValuePresent("table")) return s } diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_view_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_view_resource_gen.go index 8db3b75211..670a526dee 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_view_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/stream_on_view_resource_gen.go @@ -87,14 +87,19 @@ func (s *StreamOnViewResourceAssert) HasStaleString(expected string) *StreamOnVi return s } +func (s *StreamOnViewResourceAssert) HasStreamTypeString(expected string) *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueSet("stream_type", expected)) + return s +} + func (s *StreamOnViewResourceAssert) HasViewString(expected string) *StreamOnViewResourceAssert { s.AddAssertion(assert.ValueSet("view", expected)) return s } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (s *StreamOnViewResourceAssert) HasNoAppendOnly() *StreamOnViewResourceAssert { s.AddAssertion(assert.ValueNotSet("append_only")) @@ -102,12 +107,12 @@ func (s *StreamOnViewResourceAssert) HasNoAppendOnly() *StreamOnViewResourceAsse } func (s *StreamOnViewResourceAssert) HasNoAt() *StreamOnViewResourceAssert { - s.AddAssertion(assert.ValueNotSet("at")) + s.AddAssertion(assert.ValueSet("at.#", "0")) return s } func (s *StreamOnViewResourceAssert) HasNoBefore() *StreamOnViewResourceAssert { - s.AddAssertion(assert.ValueNotSet("before")) + s.AddAssertion(assert.ValueSet("before.#", "0")) return s } @@ -151,12 +156,122 @@ func (s *StreamOnViewResourceAssert) HasNoStale() *StreamOnViewResourceAssert { return s } +func (s *StreamOnViewResourceAssert) HasNoStreamType() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueNotSet("stream_type")) + return s +} + func (s *StreamOnViewResourceAssert) HasNoView() *StreamOnViewResourceAssert { s.AddAssertion(assert.ValueNotSet("view")) return s } -func (s *StreamOnViewResourceAssert) HasStreamTypeString(expected string) *StreamOnViewResourceAssert { - s.AddAssertion(assert.ValueSet("stream_type", expected)) +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *StreamOnViewResourceAssert) HasAppendOnlyEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueSet("append_only", "")) + return s +} +func (s *StreamOnViewResourceAssert) HasCommentEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueSet("comment", "")) + return s +} +func (s *StreamOnViewResourceAssert) HasDatabaseEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueSet("database", "")) + return s +} +func (s *StreamOnViewResourceAssert) HasFullyQualifiedNameEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return s +} +func (s *StreamOnViewResourceAssert) HasNameEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueSet("name", "")) + return s +} +func (s *StreamOnViewResourceAssert) HasSchemaEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueSet("schema", "")) + return s +} +func (s *StreamOnViewResourceAssert) HasShowInitialRowsEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueSet("show_initial_rows", "")) + return s +} +func (s *StreamOnViewResourceAssert) HasStreamTypeEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueSet("stream_type", "")) + return s +} +func (s *StreamOnViewResourceAssert) HasViewEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValueSet("view", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *StreamOnViewResourceAssert) HasAppendOnlyNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("append_only")) + return s +} + +func (s *StreamOnViewResourceAssert) HasAtNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("at")) + return s +} + +func (s *StreamOnViewResourceAssert) HasBeforeNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("before")) + return s +} + +func (s *StreamOnViewResourceAssert) HasCommentNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("comment")) + return s +} + +func (s *StreamOnViewResourceAssert) HasCopyGrantsNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("copy_grants")) + return s +} + +func (s *StreamOnViewResourceAssert) HasDatabaseNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("database")) + return s +} + +func (s *StreamOnViewResourceAssert) HasFullyQualifiedNameNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return s +} + +func (s *StreamOnViewResourceAssert) HasNameNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("name")) + return s +} + +func (s *StreamOnViewResourceAssert) HasSchemaNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("schema")) + return s +} + +func (s *StreamOnViewResourceAssert) HasShowInitialRowsNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("show_initial_rows")) + return s +} + +func (s *StreamOnViewResourceAssert) HasStaleNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("stale")) + return s +} + +func (s *StreamOnViewResourceAssert) HasStreamTypeNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("stream_type")) + return s +} + +func (s *StreamOnViewResourceAssert) HasViewNotEmpty() *StreamOnViewResourceAssert { + s.AddAssertion(assert.ValuePresent("view")) return s } diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/tag_association_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/tag_association_resource_gen.go index d9c10ba7b2..709c802004 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/tag_association_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/tag_association_resource_gen.go @@ -37,11 +37,6 @@ func (t *TagAssociationResourceAssert) HasObjectIdentifiersString(expected strin return t } -func (t *TagAssociationResourceAssert) HasObjectNameString(expected string) *TagAssociationResourceAssert { - t.AddAssertion(assert.ValueSet("object_name", expected)) - return t -} - func (t *TagAssociationResourceAssert) HasObjectTypeString(expected string) *TagAssociationResourceAssert { t.AddAssertion(assert.ValueSet("object_type", expected)) return t @@ -62,17 +57,12 @@ func (t *TagAssociationResourceAssert) HasTagValueString(expected string) *TagAs return t } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (t *TagAssociationResourceAssert) HasNoObjectIdentifiers() *TagAssociationResourceAssert { - t.AddAssertion(assert.ValueNotSet("object_identifiers")) - return t -} - -func (t *TagAssociationResourceAssert) HasNoObjectName() *TagAssociationResourceAssert { - t.AddAssertion(assert.ValueNotSet("object_name")) + t.AddAssertion(assert.ValueSet("object_identifiers.#", "0")) return t } @@ -95,3 +85,49 @@ func (t *TagAssociationResourceAssert) HasNoTagValue() *TagAssociationResourceAs t.AddAssertion(assert.ValueNotSet("tag_value")) return t } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (t *TagAssociationResourceAssert) HasObjectTypeEmpty() *TagAssociationResourceAssert { + t.AddAssertion(assert.ValueSet("object_type", "")) + return t +} +func (t *TagAssociationResourceAssert) HasTagIdEmpty() *TagAssociationResourceAssert { + t.AddAssertion(assert.ValueSet("tag_id", "")) + return t +} +func (t *TagAssociationResourceAssert) HasTagValueEmpty() *TagAssociationResourceAssert { + t.AddAssertion(assert.ValueSet("tag_value", "")) + return t +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (t *TagAssociationResourceAssert) HasObjectIdentifiersNotEmpty() *TagAssociationResourceAssert { + t.AddAssertion(assert.ValuePresent("object_identifiers")) + return t +} + +func (t *TagAssociationResourceAssert) HasObjectTypeNotEmpty() *TagAssociationResourceAssert { + t.AddAssertion(assert.ValuePresent("object_type")) + return t +} + +func (t *TagAssociationResourceAssert) HasSkipValidationNotEmpty() *TagAssociationResourceAssert { + t.AddAssertion(assert.ValuePresent("skip_validation")) + return t +} + +func (t *TagAssociationResourceAssert) HasTagIdNotEmpty() *TagAssociationResourceAssert { + t.AddAssertion(assert.ValuePresent("tag_id")) + return t +} + +func (t *TagAssociationResourceAssert) HasTagValueNotEmpty() *TagAssociationResourceAssert { + t.AddAssertion(assert.ValuePresent("tag_value")) + return t +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/tag_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/tag_resource_gen.go index 919658aff2..581e572e81 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/tag_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/tag_resource_gen.go @@ -67,12 +67,12 @@ func (t *TagResourceAssert) HasSchemaString(expected string) *TagResourceAssert return t } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (t *TagResourceAssert) HasNoAllowedValues() *TagResourceAssert { - t.AddAssertion(assert.ValueNotSet("allowed_values")) + t.AddAssertion(assert.ValueSet("allowed_values.#", "0")) return t } @@ -92,7 +92,7 @@ func (t *TagResourceAssert) HasNoFullyQualifiedName() *TagResourceAssert { } func (t *TagResourceAssert) HasNoMaskingPolicies() *TagResourceAssert { - t.AddAssertion(assert.ValueNotSet("masking_policies")) + t.AddAssertion(assert.ValueSet("masking_policies.#", "0")) return t } @@ -105,3 +105,67 @@ func (t *TagResourceAssert) HasNoSchema() *TagResourceAssert { t.AddAssertion(assert.ValueNotSet("schema")) return t } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (t *TagResourceAssert) HasCommentEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValueSet("comment", "")) + return t +} +func (t *TagResourceAssert) HasDatabaseEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValueSet("database", "")) + return t +} +func (t *TagResourceAssert) HasFullyQualifiedNameEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return t +} +func (t *TagResourceAssert) HasNameEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValueSet("name", "")) + return t +} +func (t *TagResourceAssert) HasSchemaEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValueSet("schema", "")) + return t +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (t *TagResourceAssert) HasAllowedValuesNotEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValuePresent("allowed_values")) + return t +} + +func (t *TagResourceAssert) HasCommentNotEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValuePresent("comment")) + return t +} + +func (t *TagResourceAssert) HasDatabaseNotEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValuePresent("database")) + return t +} + +func (t *TagResourceAssert) HasFullyQualifiedNameNotEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return t +} + +func (t *TagResourceAssert) HasMaskingPoliciesNotEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValuePresent("masking_policies")) + return t +} + +func (t *TagResourceAssert) HasNameNotEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValuePresent("name")) + return t +} + +func (t *TagResourceAssert) HasSchemaNotEmpty() *TagResourceAssert { + t.AddAssertion(assert.ValuePresent("schema")) + return t +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/task_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/task_resource_gen.go index 27dd1a43ec..678ca53285 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/task_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/task_resource_gen.go @@ -397,9 +397,9 @@ func (t *TaskResourceAssert) HasWhenString(expected string) *TaskResourceAssert return t } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (t *TaskResourceAssert) HasNoAbortDetachedQuery() *TaskResourceAssert { t.AddAssertion(assert.ValueNotSet("abort_detached_query")) @@ -407,7 +407,7 @@ func (t *TaskResourceAssert) HasNoAbortDetachedQuery() *TaskResourceAssert { } func (t *TaskResourceAssert) HasNoAfter() *TaskResourceAssert { - t.AddAssertion(assert.ValueNotSet("after")) + t.AddAssertion(assert.ValueSet("after.#", "0")) return t } @@ -602,7 +602,7 @@ func (t *TaskResourceAssert) HasNoS3StageVpceDnsName() *TaskResourceAssert { } func (t *TaskResourceAssert) HasNoSchedule() *TaskResourceAssert { - t.AddAssertion(assert.ValueNotSet("schedule")) + t.AddAssertion(assert.ValueSet("schedule.#", "0")) return t } @@ -765,3 +765,521 @@ func (t *TaskResourceAssert) HasNoWhen() *TaskResourceAssert { t.AddAssertion(assert.ValueNotSet("when")) return t } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (t *TaskResourceAssert) HasAllowOverlappingExecutionEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("allow_overlapping_execution", "")) + return t +} +func (t *TaskResourceAssert) HasBinaryInputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("binary_input_format", "")) + return t +} +func (t *TaskResourceAssert) HasBinaryOutputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("binary_output_format", "")) + return t +} +func (t *TaskResourceAssert) HasClientTimestampTypeMappingEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("client_timestamp_type_mapping", "")) + return t +} +func (t *TaskResourceAssert) HasCommentEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("comment", "")) + return t +} +func (t *TaskResourceAssert) HasConfigEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("config", "")) + return t +} +func (t *TaskResourceAssert) HasDatabaseEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("database", "")) + return t +} +func (t *TaskResourceAssert) HasDateInputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("date_input_format", "")) + return t +} +func (t *TaskResourceAssert) HasDateOutputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("date_output_format", "")) + return t +} +func (t *TaskResourceAssert) HasErrorIntegrationEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("error_integration", "")) + return t +} +func (t *TaskResourceAssert) HasFinalizeEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("finalize", "")) + return t +} +func (t *TaskResourceAssert) HasFullyQualifiedNameEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return t +} +func (t *TaskResourceAssert) HasGeographyOutputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("geography_output_format", "")) + return t +} +func (t *TaskResourceAssert) HasGeometryOutputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("geometry_output_format", "")) + return t +} +func (t *TaskResourceAssert) HasLogLevelEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("log_level", "")) + return t +} +func (t *TaskResourceAssert) HasNameEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("name", "")) + return t +} +func (t *TaskResourceAssert) HasQueryTagEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("query_tag", "")) + return t +} +func (t *TaskResourceAssert) HasS3StageVpceDnsNameEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("s3_stage_vpce_dns_name", "")) + return t +} +func (t *TaskResourceAssert) HasSchemaEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("schema", "")) + return t +} +func (t *TaskResourceAssert) HasSearchPathEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("search_path", "")) + return t +} +func (t *TaskResourceAssert) HasSqlStatementEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("sql_statement", "")) + return t +} +func (t *TaskResourceAssert) HasTimeInputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("time_input_format", "")) + return t +} +func (t *TaskResourceAssert) HasTimeOutputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("time_output_format", "")) + return t +} +func (t *TaskResourceAssert) HasTimestampInputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("timestamp_input_format", "")) + return t +} +func (t *TaskResourceAssert) HasTimestampLtzOutputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("timestamp_ltz_output_format", "")) + return t +} +func (t *TaskResourceAssert) HasTimestampNtzOutputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("timestamp_ntz_output_format", "")) + return t +} +func (t *TaskResourceAssert) HasTimestampOutputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("timestamp_output_format", "")) + return t +} +func (t *TaskResourceAssert) HasTimestampTypeMappingEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("timestamp_type_mapping", "")) + return t +} +func (t *TaskResourceAssert) HasTimestampTzOutputFormatEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("timestamp_tz_output_format", "")) + return t +} +func (t *TaskResourceAssert) HasTimezoneEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("timezone", "")) + return t +} +func (t *TaskResourceAssert) HasTraceLevelEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("trace_level", "")) + return t +} +func (t *TaskResourceAssert) HasTransactionDefaultIsolationLevelEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("transaction_default_isolation_level", "")) + return t +} +func (t *TaskResourceAssert) HasUnsupportedDdlActionEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("unsupported_ddl_action", "")) + return t +} +func (t *TaskResourceAssert) HasUserTaskManagedInitialWarehouseSizeEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("user_task_managed_initial_warehouse_size", "")) + return t +} +func (t *TaskResourceAssert) HasWarehouseEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("warehouse", "")) + return t +} +func (t *TaskResourceAssert) HasWhenEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValueSet("when", "")) + return t +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (t *TaskResourceAssert) HasAbortDetachedQueryNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("abort_detached_query")) + return t +} + +func (t *TaskResourceAssert) HasAfterNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("after")) + return t +} + +func (t *TaskResourceAssert) HasAllowOverlappingExecutionNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("allow_overlapping_execution")) + return t +} + +func (t *TaskResourceAssert) HasAutocommitNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("autocommit")) + return t +} + +func (t *TaskResourceAssert) HasBinaryInputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("binary_input_format")) + return t +} + +func (t *TaskResourceAssert) HasBinaryOutputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("binary_output_format")) + return t +} + +func (t *TaskResourceAssert) HasClientMemoryLimitNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("client_memory_limit")) + return t +} + +func (t *TaskResourceAssert) HasClientMetadataRequestUseConnectionCtxNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("client_metadata_request_use_connection_ctx")) + return t +} + +func (t *TaskResourceAssert) HasClientPrefetchThreadsNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("client_prefetch_threads")) + return t +} + +func (t *TaskResourceAssert) HasClientResultChunkSizeNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("client_result_chunk_size")) + return t +} + +func (t *TaskResourceAssert) HasClientResultColumnCaseInsensitiveNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("client_result_column_case_insensitive")) + return t +} + +func (t *TaskResourceAssert) HasClientSessionKeepAliveNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("client_session_keep_alive")) + return t +} + +func (t *TaskResourceAssert) HasClientSessionKeepAliveHeartbeatFrequencyNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("client_session_keep_alive_heartbeat_frequency")) + return t +} + +func (t *TaskResourceAssert) HasClientTimestampTypeMappingNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("client_timestamp_type_mapping")) + return t +} + +func (t *TaskResourceAssert) HasCommentNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("comment")) + return t +} + +func (t *TaskResourceAssert) HasConfigNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("config")) + return t +} + +func (t *TaskResourceAssert) HasDatabaseNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("database")) + return t +} + +func (t *TaskResourceAssert) HasDateInputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("date_input_format")) + return t +} + +func (t *TaskResourceAssert) HasDateOutputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("date_output_format")) + return t +} + +func (t *TaskResourceAssert) HasEnableUnloadPhysicalTypeOptimizationNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("enable_unload_physical_type_optimization")) + return t +} + +func (t *TaskResourceAssert) HasErrorIntegrationNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("error_integration")) + return t +} + +func (t *TaskResourceAssert) HasErrorOnNondeterministicMergeNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("error_on_nondeterministic_merge")) + return t +} + +func (t *TaskResourceAssert) HasErrorOnNondeterministicUpdateNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("error_on_nondeterministic_update")) + return t +} + +func (t *TaskResourceAssert) HasFinalizeNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("finalize")) + return t +} + +func (t *TaskResourceAssert) HasFullyQualifiedNameNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return t +} + +func (t *TaskResourceAssert) HasGeographyOutputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("geography_output_format")) + return t +} + +func (t *TaskResourceAssert) HasGeometryOutputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("geometry_output_format")) + return t +} + +func (t *TaskResourceAssert) HasJdbcTreatTimestampNtzAsUtcNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("jdbc_treat_timestamp_ntz_as_utc")) + return t +} + +func (t *TaskResourceAssert) HasJdbcUseSessionTimezoneNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("jdbc_use_session_timezone")) + return t +} + +func (t *TaskResourceAssert) HasJsonIndentNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("json_indent")) + return t +} + +func (t *TaskResourceAssert) HasLockTimeoutNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("lock_timeout")) + return t +} + +func (t *TaskResourceAssert) HasLogLevelNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("log_level")) + return t +} + +func (t *TaskResourceAssert) HasMultiStatementCountNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("multi_statement_count")) + return t +} + +func (t *TaskResourceAssert) HasNameNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("name")) + return t +} + +func (t *TaskResourceAssert) HasNoorderSequenceAsDefaultNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("noorder_sequence_as_default")) + return t +} + +func (t *TaskResourceAssert) HasOdbcTreatDecimalAsIntNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("odbc_treat_decimal_as_int")) + return t +} + +func (t *TaskResourceAssert) HasQueryTagNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("query_tag")) + return t +} + +func (t *TaskResourceAssert) HasQuotedIdentifiersIgnoreCaseNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("quoted_identifiers_ignore_case")) + return t +} + +func (t *TaskResourceAssert) HasRowsPerResultsetNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("rows_per_resultset")) + return t +} + +func (t *TaskResourceAssert) HasS3StageVpceDnsNameNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("s3_stage_vpce_dns_name")) + return t +} + +func (t *TaskResourceAssert) HasScheduleNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("schedule")) + return t +} + +func (t *TaskResourceAssert) HasSchemaNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("schema")) + return t +} + +func (t *TaskResourceAssert) HasSearchPathNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("search_path")) + return t +} + +func (t *TaskResourceAssert) HasSqlStatementNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("sql_statement")) + return t +} + +func (t *TaskResourceAssert) HasStartedNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("started")) + return t +} + +func (t *TaskResourceAssert) HasStatementQueuedTimeoutInSecondsNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("statement_queued_timeout_in_seconds")) + return t +} + +func (t *TaskResourceAssert) HasStatementTimeoutInSecondsNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("statement_timeout_in_seconds")) + return t +} + +func (t *TaskResourceAssert) HasStrictJsonOutputNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("strict_json_output")) + return t +} + +func (t *TaskResourceAssert) HasSuspendTaskAfterNumFailuresNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("suspend_task_after_num_failures")) + return t +} + +func (t *TaskResourceAssert) HasTaskAutoRetryAttemptsNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("task_auto_retry_attempts")) + return t +} + +func (t *TaskResourceAssert) HasTimeInputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("time_input_format")) + return t +} + +func (t *TaskResourceAssert) HasTimeOutputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("time_output_format")) + return t +} + +func (t *TaskResourceAssert) HasTimestampDayIsAlways24hNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("timestamp_day_is_always_24h")) + return t +} + +func (t *TaskResourceAssert) HasTimestampInputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("timestamp_input_format")) + return t +} + +func (t *TaskResourceAssert) HasTimestampLtzOutputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("timestamp_ltz_output_format")) + return t +} + +func (t *TaskResourceAssert) HasTimestampNtzOutputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("timestamp_ntz_output_format")) + return t +} + +func (t *TaskResourceAssert) HasTimestampOutputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("timestamp_output_format")) + return t +} + +func (t *TaskResourceAssert) HasTimestampTypeMappingNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("timestamp_type_mapping")) + return t +} + +func (t *TaskResourceAssert) HasTimestampTzOutputFormatNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("timestamp_tz_output_format")) + return t +} + +func (t *TaskResourceAssert) HasTimezoneNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("timezone")) + return t +} + +func (t *TaskResourceAssert) HasTraceLevelNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("trace_level")) + return t +} + +func (t *TaskResourceAssert) HasTransactionAbortOnErrorNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("transaction_abort_on_error")) + return t +} + +func (t *TaskResourceAssert) HasTransactionDefaultIsolationLevelNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("transaction_default_isolation_level")) + return t +} + +func (t *TaskResourceAssert) HasTwoDigitCenturyStartNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("two_digit_century_start")) + return t +} + +func (t *TaskResourceAssert) HasUnsupportedDdlActionNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("unsupported_ddl_action")) + return t +} + +func (t *TaskResourceAssert) HasUseCachedResultNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("use_cached_result")) + return t +} + +func (t *TaskResourceAssert) HasUserTaskManagedInitialWarehouseSizeNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("user_task_managed_initial_warehouse_size")) + return t +} + +func (t *TaskResourceAssert) HasUserTaskMinimumTriggerIntervalInSecondsNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("user_task_minimum_trigger_interval_in_seconds")) + return t +} + +func (t *TaskResourceAssert) HasUserTaskTimeoutMsNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("user_task_timeout_ms")) + return t +} + +func (t *TaskResourceAssert) HasWarehouseNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("warehouse")) + return t +} + +func (t *TaskResourceAssert) HasWeekOfYearPolicyNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("week_of_year_policy")) + return t +} + +func (t *TaskResourceAssert) HasWeekStartNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("week_start")) + return t +} + +func (t *TaskResourceAssert) HasWhenNotEmpty() *TaskResourceAssert { + t.AddAssertion(assert.ValuePresent("when")) + return t +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/user_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/user_resource_gen.go index 9bc2d1eb70..a51adae54d 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/user_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/user_resource_gen.go @@ -437,9 +437,9 @@ func (u *UserResourceAssert) HasWeekStartString(expected string) *UserResourceAs return u } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (u *UserResourceAssert) HasNoAbortDetachedQuery() *UserResourceAssert { u.AddAssertion(assert.ValueNotSet("abort_detached_query")) @@ -845,3 +845,597 @@ func (u *UserResourceAssert) HasNoWeekStart() *UserResourceAssert { u.AddAssertion(assert.ValueNotSet("week_start")) return u } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (u *UserResourceAssert) HasBinaryInputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("binary_input_format", "")) + return u +} +func (u *UserResourceAssert) HasBinaryOutputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("binary_output_format", "")) + return u +} +func (u *UserResourceAssert) HasClientTimestampTypeMappingEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("client_timestamp_type_mapping", "")) + return u +} +func (u *UserResourceAssert) HasCommentEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("comment", "")) + return u +} +func (u *UserResourceAssert) HasDateInputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("date_input_format", "")) + return u +} +func (u *UserResourceAssert) HasDateOutputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("date_output_format", "")) + return u +} +func (u *UserResourceAssert) HasDefaultNamespaceEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("default_namespace", "")) + return u +} +func (u *UserResourceAssert) HasDefaultRoleEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("default_role", "")) + return u +} +func (u *UserResourceAssert) HasDefaultSecondaryRolesOptionEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("default_secondary_roles_option", "")) + return u +} +func (u *UserResourceAssert) HasDefaultWarehouseEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("default_warehouse", "")) + return u +} +func (u *UserResourceAssert) HasDisableMfaEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("disable_mfa", "")) + return u +} +func (u *UserResourceAssert) HasDisabledEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("disabled", "")) + return u +} +func (u *UserResourceAssert) HasDisplayNameEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("display_name", "")) + return u +} +func (u *UserResourceAssert) HasEmailEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("email", "")) + return u +} +func (u *UserResourceAssert) HasFirstNameEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("first_name", "")) + return u +} +func (u *UserResourceAssert) HasFullyQualifiedNameEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return u +} +func (u *UserResourceAssert) HasGeographyOutputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("geography_output_format", "")) + return u +} +func (u *UserResourceAssert) HasGeometryOutputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("geometry_output_format", "")) + return u +} +func (u *UserResourceAssert) HasLastNameEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("last_name", "")) + return u +} +func (u *UserResourceAssert) HasLogLevelEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("log_level", "")) + return u +} +func (u *UserResourceAssert) HasLoginNameEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("login_name", "")) + return u +} +func (u *UserResourceAssert) HasMiddleNameEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("middle_name", "")) + return u +} +func (u *UserResourceAssert) HasMustChangePasswordEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("must_change_password", "")) + return u +} +func (u *UserResourceAssert) HasNameEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("name", "")) + return u +} +func (u *UserResourceAssert) HasNetworkPolicyEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("network_policy", "")) + return u +} +func (u *UserResourceAssert) HasPasswordEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("password", "")) + return u +} +func (u *UserResourceAssert) HasQueryTagEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("query_tag", "")) + return u +} +func (u *UserResourceAssert) HasRsaPublicKeyEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("rsa_public_key", "")) + return u +} +func (u *UserResourceAssert) HasRsaPublicKey2Empty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("rsa_public_key_2", "")) + return u +} +func (u *UserResourceAssert) HasS3StageVpceDnsNameEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("s3_stage_vpce_dns_name", "")) + return u +} +func (u *UserResourceAssert) HasSearchPathEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("search_path", "")) + return u +} +func (u *UserResourceAssert) HasSimulatedDataSharingConsumerEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("simulated_data_sharing_consumer", "")) + return u +} +func (u *UserResourceAssert) HasTimeInputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("time_input_format", "")) + return u +} +func (u *UserResourceAssert) HasTimeOutputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("time_output_format", "")) + return u +} +func (u *UserResourceAssert) HasTimestampInputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("timestamp_input_format", "")) + return u +} +func (u *UserResourceAssert) HasTimestampLtzOutputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("timestamp_ltz_output_format", "")) + return u +} +func (u *UserResourceAssert) HasTimestampNtzOutputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("timestamp_ntz_output_format", "")) + return u +} +func (u *UserResourceAssert) HasTimestampOutputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("timestamp_output_format", "")) + return u +} +func (u *UserResourceAssert) HasTimestampTypeMappingEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("timestamp_type_mapping", "")) + return u +} +func (u *UserResourceAssert) HasTimestampTzOutputFormatEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("timestamp_tz_output_format", "")) + return u +} +func (u *UserResourceAssert) HasTimezoneEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("timezone", "")) + return u +} +func (u *UserResourceAssert) HasTraceLevelEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("trace_level", "")) + return u +} +func (u *UserResourceAssert) HasTransactionDefaultIsolationLevelEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("transaction_default_isolation_level", "")) + return u +} +func (u *UserResourceAssert) HasUnsupportedDdlActionEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("unsupported_ddl_action", "")) + return u +} +func (u *UserResourceAssert) HasUserTypeEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValueSet("user_type", "")) + return u +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (u *UserResourceAssert) HasAbortDetachedQueryNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("abort_detached_query")) + return u +} + +func (u *UserResourceAssert) HasAutocommitNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("autocommit")) + return u +} + +func (u *UserResourceAssert) HasBinaryInputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("binary_input_format")) + return u +} + +func (u *UserResourceAssert) HasBinaryOutputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("binary_output_format")) + return u +} + +func (u *UserResourceAssert) HasClientMemoryLimitNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("client_memory_limit")) + return u +} + +func (u *UserResourceAssert) HasClientMetadataRequestUseConnectionCtxNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("client_metadata_request_use_connection_ctx")) + return u +} + +func (u *UserResourceAssert) HasClientPrefetchThreadsNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("client_prefetch_threads")) + return u +} + +func (u *UserResourceAssert) HasClientResultChunkSizeNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("client_result_chunk_size")) + return u +} + +func (u *UserResourceAssert) HasClientResultColumnCaseInsensitiveNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("client_result_column_case_insensitive")) + return u +} + +func (u *UserResourceAssert) HasClientSessionKeepAliveNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("client_session_keep_alive")) + return u +} + +func (u *UserResourceAssert) HasClientSessionKeepAliveHeartbeatFrequencyNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("client_session_keep_alive_heartbeat_frequency")) + return u +} + +func (u *UserResourceAssert) HasClientTimestampTypeMappingNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("client_timestamp_type_mapping")) + return u +} + +func (u *UserResourceAssert) HasCommentNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("comment")) + return u +} + +func (u *UserResourceAssert) HasDateInputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("date_input_format")) + return u +} + +func (u *UserResourceAssert) HasDateOutputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("date_output_format")) + return u +} + +func (u *UserResourceAssert) HasDaysToExpiryNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("days_to_expiry")) + return u +} + +func (u *UserResourceAssert) HasDefaultNamespaceNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("default_namespace")) + return u +} + +func (u *UserResourceAssert) HasDefaultRoleNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("default_role")) + return u +} + +func (u *UserResourceAssert) HasDefaultSecondaryRolesOptionNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("default_secondary_roles_option")) + return u +} + +func (u *UserResourceAssert) HasDefaultWarehouseNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("default_warehouse")) + return u +} + +func (u *UserResourceAssert) HasDisableMfaNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("disable_mfa")) + return u +} + +func (u *UserResourceAssert) HasDisabledNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("disabled")) + return u +} + +func (u *UserResourceAssert) HasDisplayNameNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("display_name")) + return u +} + +func (u *UserResourceAssert) HasEmailNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("email")) + return u +} + +func (u *UserResourceAssert) HasEnableUnloadPhysicalTypeOptimizationNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("enable_unload_physical_type_optimization")) + return u +} + +func (u *UserResourceAssert) HasEnableUnredactedQuerySyntaxErrorNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("enable_unredacted_query_syntax_error")) + return u +} + +func (u *UserResourceAssert) HasErrorOnNondeterministicMergeNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("error_on_nondeterministic_merge")) + return u +} + +func (u *UserResourceAssert) HasErrorOnNondeterministicUpdateNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("error_on_nondeterministic_update")) + return u +} + +func (u *UserResourceAssert) HasFirstNameNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("first_name")) + return u +} + +func (u *UserResourceAssert) HasFullyQualifiedNameNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return u +} + +func (u *UserResourceAssert) HasGeographyOutputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("geography_output_format")) + return u +} + +func (u *UserResourceAssert) HasGeometryOutputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("geometry_output_format")) + return u +} + +func (u *UserResourceAssert) HasJdbcTreatDecimalAsIntNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("jdbc_treat_decimal_as_int")) + return u +} + +func (u *UserResourceAssert) HasJdbcTreatTimestampNtzAsUtcNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("jdbc_treat_timestamp_ntz_as_utc")) + return u +} + +func (u *UserResourceAssert) HasJdbcUseSessionTimezoneNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("jdbc_use_session_timezone")) + return u +} + +func (u *UserResourceAssert) HasJsonIndentNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("json_indent")) + return u +} + +func (u *UserResourceAssert) HasLastNameNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("last_name")) + return u +} + +func (u *UserResourceAssert) HasLockTimeoutNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("lock_timeout")) + return u +} + +func (u *UserResourceAssert) HasLogLevelNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("log_level")) + return u +} + +func (u *UserResourceAssert) HasLoginNameNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("login_name")) + return u +} + +func (u *UserResourceAssert) HasMiddleNameNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("middle_name")) + return u +} + +func (u *UserResourceAssert) HasMinsToBypassMfaNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("mins_to_bypass_mfa")) + return u +} + +func (u *UserResourceAssert) HasMinsToUnlockNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("mins_to_unlock")) + return u +} + +func (u *UserResourceAssert) HasMultiStatementCountNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("multi_statement_count")) + return u +} + +func (u *UserResourceAssert) HasMustChangePasswordNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("must_change_password")) + return u +} + +func (u *UserResourceAssert) HasNameNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("name")) + return u +} + +func (u *UserResourceAssert) HasNetworkPolicyNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("network_policy")) + return u +} + +func (u *UserResourceAssert) HasNoorderSequenceAsDefaultNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("noorder_sequence_as_default")) + return u +} + +func (u *UserResourceAssert) HasOdbcTreatDecimalAsIntNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("odbc_treat_decimal_as_int")) + return u +} + +func (u *UserResourceAssert) HasPasswordNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("password")) + return u +} + +func (u *UserResourceAssert) HasPreventUnloadToInternalStagesNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("prevent_unload_to_internal_stages")) + return u +} + +func (u *UserResourceAssert) HasQueryTagNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("query_tag")) + return u +} + +func (u *UserResourceAssert) HasQuotedIdentifiersIgnoreCaseNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("quoted_identifiers_ignore_case")) + return u +} + +func (u *UserResourceAssert) HasRowsPerResultsetNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("rows_per_resultset")) + return u +} + +func (u *UserResourceAssert) HasRsaPublicKeyNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("rsa_public_key")) + return u +} + +func (u *UserResourceAssert) HasRsaPublicKey2NotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("rsa_public_key_2")) + return u +} + +func (u *UserResourceAssert) HasS3StageVpceDnsNameNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("s3_stage_vpce_dns_name")) + return u +} + +func (u *UserResourceAssert) HasSearchPathNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("search_path")) + return u +} + +func (u *UserResourceAssert) HasSimulatedDataSharingConsumerNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("simulated_data_sharing_consumer")) + return u +} + +func (u *UserResourceAssert) HasStatementQueuedTimeoutInSecondsNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("statement_queued_timeout_in_seconds")) + return u +} + +func (u *UserResourceAssert) HasStatementTimeoutInSecondsNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("statement_timeout_in_seconds")) + return u +} + +func (u *UserResourceAssert) HasStrictJsonOutputNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("strict_json_output")) + return u +} + +func (u *UserResourceAssert) HasTimeInputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("time_input_format")) + return u +} + +func (u *UserResourceAssert) HasTimeOutputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("time_output_format")) + return u +} + +func (u *UserResourceAssert) HasTimestampDayIsAlways24hNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("timestamp_day_is_always_24h")) + return u +} + +func (u *UserResourceAssert) HasTimestampInputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("timestamp_input_format")) + return u +} + +func (u *UserResourceAssert) HasTimestampLtzOutputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("timestamp_ltz_output_format")) + return u +} + +func (u *UserResourceAssert) HasTimestampNtzOutputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("timestamp_ntz_output_format")) + return u +} + +func (u *UserResourceAssert) HasTimestampOutputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("timestamp_output_format")) + return u +} + +func (u *UserResourceAssert) HasTimestampTypeMappingNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("timestamp_type_mapping")) + return u +} + +func (u *UserResourceAssert) HasTimestampTzOutputFormatNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("timestamp_tz_output_format")) + return u +} + +func (u *UserResourceAssert) HasTimezoneNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("timezone")) + return u +} + +func (u *UserResourceAssert) HasTraceLevelNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("trace_level")) + return u +} + +func (u *UserResourceAssert) HasTransactionAbortOnErrorNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("transaction_abort_on_error")) + return u +} + +func (u *UserResourceAssert) HasTransactionDefaultIsolationLevelNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("transaction_default_isolation_level")) + return u +} + +func (u *UserResourceAssert) HasTwoDigitCenturyStartNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("two_digit_century_start")) + return u +} + +func (u *UserResourceAssert) HasUnsupportedDdlActionNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("unsupported_ddl_action")) + return u +} + +func (u *UserResourceAssert) HasUseCachedResultNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("use_cached_result")) + return u +} + +func (u *UserResourceAssert) HasUserTypeNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("user_type")) + return u +} + +func (u *UserResourceAssert) HasWeekOfYearPolicyNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("week_of_year_policy")) + return u +} + +func (u *UserResourceAssert) HasWeekStartNotEmpty() *UserResourceAssert { + u.AddAssertion(assert.ValuePresent("week_start")) + return u +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/view_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/view_resource_gen.go index f95069aa91..db87751b85 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/view_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/view_resource_gen.go @@ -112,12 +112,12 @@ func (v *ViewResourceAssert) HasStatementString(expected string) *ViewResourceAs return v } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (v *ViewResourceAssert) HasNoAggregationPolicy() *ViewResourceAssert { - v.AddAssertion(assert.ValueNotSet("aggregation_policy")) + v.AddAssertion(assert.ValueSet("aggregation_policy.#", "0")) return v } @@ -127,7 +127,7 @@ func (v *ViewResourceAssert) HasNoChangeTracking() *ViewResourceAssert { } func (v *ViewResourceAssert) HasNoColumn() *ViewResourceAssert { - v.AddAssertion(assert.ValueNotSet("column")) + v.AddAssertion(assert.ValueSet("column.#", "0")) return v } @@ -142,12 +142,12 @@ func (v *ViewResourceAssert) HasNoCopyGrants() *ViewResourceAssert { } func (v *ViewResourceAssert) HasNoDataMetricFunction() *ViewResourceAssert { - v.AddAssertion(assert.ValueNotSet("data_metric_function")) + v.AddAssertion(assert.ValueSet("data_metric_function.#", "0")) return v } func (v *ViewResourceAssert) HasNoDataMetricSchedule() *ViewResourceAssert { - v.AddAssertion(assert.ValueNotSet("data_metric_schedule")) + v.AddAssertion(assert.ValueSet("data_metric_schedule.#", "0")) return v } @@ -182,7 +182,7 @@ func (v *ViewResourceAssert) HasNoName() *ViewResourceAssert { } func (v *ViewResourceAssert) HasNoRowAccessPolicy() *ViewResourceAssert { - v.AddAssertion(assert.ValueNotSet("row_access_policy")) + v.AddAssertion(assert.ValueSet("row_access_policy.#", "0")) return v } @@ -195,3 +195,132 @@ func (v *ViewResourceAssert) HasNoStatement() *ViewResourceAssert { v.AddAssertion(assert.ValueNotSet("statement")) return v } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (v *ViewResourceAssert) HasChangeTrackingEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValueSet("change_tracking", "")) + return v +} +func (v *ViewResourceAssert) HasCommentEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValueSet("comment", "")) + return v +} +func (v *ViewResourceAssert) HasDatabaseEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValueSet("database", "")) + return v +} +func (v *ViewResourceAssert) HasFullyQualifiedNameEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return v +} +func (v *ViewResourceAssert) HasIsRecursiveEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValueSet("is_recursive", "")) + return v +} +func (v *ViewResourceAssert) HasIsSecureEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValueSet("is_secure", "")) + return v +} +func (v *ViewResourceAssert) HasIsTemporaryEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValueSet("is_temporary", "")) + return v +} +func (v *ViewResourceAssert) HasNameEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValueSet("name", "")) + return v +} +func (v *ViewResourceAssert) HasSchemaEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValueSet("schema", "")) + return v +} +func (v *ViewResourceAssert) HasStatementEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValueSet("statement", "")) + return v +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (v *ViewResourceAssert) HasAggregationPolicyNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("aggregation_policy")) + return v +} + +func (v *ViewResourceAssert) HasChangeTrackingNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("change_tracking")) + return v +} + +func (v *ViewResourceAssert) HasColumnNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("column")) + return v +} + +func (v *ViewResourceAssert) HasCommentNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("comment")) + return v +} + +func (v *ViewResourceAssert) HasCopyGrantsNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("copy_grants")) + return v +} + +func (v *ViewResourceAssert) HasDataMetricFunctionNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("data_metric_function")) + return v +} + +func (v *ViewResourceAssert) HasDataMetricScheduleNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("data_metric_schedule")) + return v +} + +func (v *ViewResourceAssert) HasDatabaseNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("database")) + return v +} + +func (v *ViewResourceAssert) HasFullyQualifiedNameNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return v +} + +func (v *ViewResourceAssert) HasIsRecursiveNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("is_recursive")) + return v +} + +func (v *ViewResourceAssert) HasIsSecureNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("is_secure")) + return v +} + +func (v *ViewResourceAssert) HasIsTemporaryNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("is_temporary")) + return v +} + +func (v *ViewResourceAssert) HasNameNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("name")) + return v +} + +func (v *ViewResourceAssert) HasRowAccessPolicyNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("row_access_policy")) + return v +} + +func (v *ViewResourceAssert) HasSchemaNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("schema")) + return v +} + +func (v *ViewResourceAssert) HasStatementNotEmpty() *ViewResourceAssert { + v.AddAssertion(assert.ValuePresent("statement")) + return v +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceassert/warehouse_resource_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceassert/warehouse_resource_gen.go index c8eaa5f92b..4df5fe9610 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceassert/warehouse_resource_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceassert/warehouse_resource_gen.go @@ -117,9 +117,9 @@ func (w *WarehouseResourceAssert) HasWarehouseTypeString(expected string) *Wareh return w } -//////////////////////////// -// Attribute empty checks // -//////////////////////////// +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// func (w *WarehouseResourceAssert) HasNoAutoResume() *WarehouseResourceAssert { w.AddAssertion(assert.ValueNotSet("auto_resume")) @@ -205,3 +205,133 @@ func (w *WarehouseResourceAssert) HasNoWarehouseType() *WarehouseResourceAssert w.AddAssertion(assert.ValueNotSet("warehouse_type")) return w } + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (w *WarehouseResourceAssert) HasAutoResumeEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValueSet("auto_resume", "")) + return w +} +func (w *WarehouseResourceAssert) HasCommentEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValueSet("comment", "")) + return w +} +func (w *WarehouseResourceAssert) HasEnableQueryAccelerationEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValueSet("enable_query_acceleration", "")) + return w +} +func (w *WarehouseResourceAssert) HasFullyQualifiedNameEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValueSet("fully_qualified_name", "")) + return w +} +func (w *WarehouseResourceAssert) HasNameEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValueSet("name", "")) + return w +} +func (w *WarehouseResourceAssert) HasResourceMonitorEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValueSet("resource_monitor", "")) + return w +} +func (w *WarehouseResourceAssert) HasScalingPolicyEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValueSet("scaling_policy", "")) + return w +} +func (w *WarehouseResourceAssert) HasWarehouseSizeEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValueSet("warehouse_size", "")) + return w +} +func (w *WarehouseResourceAssert) HasWarehouseTypeEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValueSet("warehouse_type", "")) + return w +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (w *WarehouseResourceAssert) HasAutoResumeNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("auto_resume")) + return w +} + +func (w *WarehouseResourceAssert) HasAutoSuspendNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("auto_suspend")) + return w +} + +func (w *WarehouseResourceAssert) HasCommentNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("comment")) + return w +} + +func (w *WarehouseResourceAssert) HasEnableQueryAccelerationNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("enable_query_acceleration")) + return w +} + +func (w *WarehouseResourceAssert) HasFullyQualifiedNameNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("fully_qualified_name")) + return w +} + +func (w *WarehouseResourceAssert) HasInitiallySuspendedNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("initially_suspended")) + return w +} + +func (w *WarehouseResourceAssert) HasMaxClusterCountNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("max_cluster_count")) + return w +} + +func (w *WarehouseResourceAssert) HasMaxConcurrencyLevelNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("max_concurrency_level")) + return w +} + +func (w *WarehouseResourceAssert) HasMinClusterCountNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("min_cluster_count")) + return w +} + +func (w *WarehouseResourceAssert) HasNameNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("name")) + return w +} + +func (w *WarehouseResourceAssert) HasQueryAccelerationMaxScaleFactorNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("query_acceleration_max_scale_factor")) + return w +} + +func (w *WarehouseResourceAssert) HasResourceMonitorNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("resource_monitor")) + return w +} + +func (w *WarehouseResourceAssert) HasScalingPolicyNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("scaling_policy")) + return w +} + +func (w *WarehouseResourceAssert) HasStatementQueuedTimeoutInSecondsNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("statement_queued_timeout_in_seconds")) + return w +} + +func (w *WarehouseResourceAssert) HasStatementTimeoutInSecondsNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("statement_timeout_in_seconds")) + return w +} + +func (w *WarehouseResourceAssert) HasWarehouseSizeNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("warehouse_size")) + return w +} + +func (w *WarehouseResourceAssert) HasWarehouseTypeNotEmpty() *WarehouseResourceAssert { + w.AddAssertion(assert.ValuePresent("warehouse_type")) + return w +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/account_show_output_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/account_show_output_ext.go index 82f9d25bbc..632f6298ff 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/account_show_output_ext.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/account_show_output_ext.go @@ -16,156 +16,58 @@ func AccountDatasourceShowOutput(t *testing.T, name string) *AccountShowOutputAs return &a } +// TODO: Why those are not duplicates + func (a *AccountShowOutputAssert) HasAccountUrlNotEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValuePresent("account_url")) return a } -func (a *AccountShowOutputAssert) HasCreatedOnNotEmpty() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) - return a -} - -func (a *AccountShowOutputAssert) HasAccountLocatorNotEmpty() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValuePresent("account_locator")) - return a -} - -func (a *AccountShowOutputAssert) HasAccountLocatorUrlNotEmpty() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValuePresent("account_locator_url")) - return a -} - -func (a *AccountShowOutputAssert) HasConsumptionBillingEntityNameNotEmpty() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValuePresent("consumption_billing_entity_name")) - return a -} - -func (a *AccountShowOutputAssert) HasNoOrganizationOldUrl() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("organization_old_url")) - return a -} - -func (a *AccountShowOutputAssert) HasOrganizationOldUrlEmpty() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueSet("organization_old_url", "")) - return a -} - -func (a *AccountShowOutputAssert) HasMarketplaceProviderBillingEntityNameNotEmpty() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValuePresent("marketplace_provider_billing_entity_name")) - return a -} - -func (a *AccountShowOutputAssert) HasNoAccountOldUrlSavedOn() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("account_old_url_saved_on")) - return a -} - func (a *AccountShowOutputAssert) HasAccountOldUrlSavedOnEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("account_old_url_saved_on", "")) return a } -func (a *AccountShowOutputAssert) HasNoAccountOldUrlLastUsed() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("account_old_url_last_used")) - return a -} - func (a *AccountShowOutputAssert) HasAccountOldUrlLastUsedEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("account_old_url_last_used", "")) return a } -func (a *AccountShowOutputAssert) HasNoOrganizationOldUrlSavedOn() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("organization_old_url_saved_on")) - return a -} - func (a *AccountShowOutputAssert) HasOrganizationOldUrlSavedOnEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("organization_old_url_saved_on", "")) return a } -func (a *AccountShowOutputAssert) HasNoOrganizationOldUrlLastUsed() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("organization_old_url_last_used")) - return a -} - func (a *AccountShowOutputAssert) HasOrganizationOldUrlLastUsedEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("organization_old_url_last_used", "")) return a } -func (a *AccountShowOutputAssert) HasNoDroppedOn() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("dropped_on")) - return a -} - func (a *AccountShowOutputAssert) HasDroppedOnEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("dropped_on", "")) return a } -func (a *AccountShowOutputAssert) HasNoScheduledDeletionTime() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("scheduled_deletion_time")) - return a -} - func (a *AccountShowOutputAssert) HasScheduledDeletionTimeEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("scheduled_deletion_time", "")) return a } -func (a *AccountShowOutputAssert) HasNoRestoredOn() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("restored_on")) - return a -} - func (a *AccountShowOutputAssert) HasRestoredOnEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("restored_on", "")) return a } -func (a *AccountShowOutputAssert) HasNoMovedToOrganization() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("moved_to_organization")) - return a -} - -func (a *AccountShowOutputAssert) HasMovedToOrganizationEmpty() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueSet("moved_to_organization", "")) - return a -} - -func (a *AccountShowOutputAssert) HasMovedOnEmpty() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueSet("moved_on", "")) - return a -} - -func (a *AccountShowOutputAssert) HasNoOrganizationUrlExpirationOn() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("organization_url_expiration_on")) - return a -} - func (a *AccountShowOutputAssert) HasOrganizationUrlExpirationOnEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("organization_url_expiration_on", "")) return a } -func (a *AccountShowOutputAssert) HasNoIsEventsAccount() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("is_events_account")) - return a -} - func (a *AccountShowOutputAssert) HasIsEventsAccountEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("is_events_account", "")) return a } -func (a *AccountShowOutputAssert) HasNoIsOrganizationAccount() *AccountShowOutputAssert { - a.AddAssertion(assert.ResourceShowOutputValueNotSet("is_organization_account")) - return a -} - func (a *AccountShowOutputAssert) HasIsOrganizationAccountEmpty() *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("is_organization_account", "")) return a diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/account_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/account_show_output_gen.go index f2b91e7ad7..cc738aca53 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/account_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/account_show_output_gen.go @@ -20,21 +20,21 @@ type AccountShowOutputAssert struct { func AccountShowOutput(t *testing.T, name string) *AccountShowOutputAssert { t.Helper() - a := AccountShowOutputAssert{ + accountAssert := AccountShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - a.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &a + accountAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &accountAssert } func ImportedAccountShowOutput(t *testing.T, id string) *AccountShowOutputAssert { t.Helper() - a := AccountShowOutputAssert{ + accountAssert := AccountShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - a.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &a + accountAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &accountAssert } //////////////////////////// @@ -86,7 +86,7 @@ func (a *AccountShowOutputAssert) HasAccountLocator(expected string) *AccountSho return a } -func (a *AccountShowOutputAssert) HasAccountLocatorURL(expected string) *AccountShowOutputAssert { +func (a *AccountShowOutputAssert) HasAccountLocatorUrl(expected string) *AccountShowOutputAssert { a.AddAssertion(assert.ResourceShowOutputValueSet("account_locator_url", expected)) return a } @@ -185,3 +185,380 @@ func (a *AccountShowOutputAssert) HasOrganizationUrlExpirationOn(expected time.T a.AddAssertion(assert.ResourceShowOutputValueSet("organization_url_expiration_on", expected.String())) return a } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (a *AccountShowOutputAssert) HasNoOrganizationName() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("organization_name")) + return a +} + +func (a *AccountShowOutputAssert) HasNoAccountName() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("account_name")) + return a +} + +func (a *AccountShowOutputAssert) HasNoSnowflakeRegion() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("snowflake_region")) + return a +} + +func (a *AccountShowOutputAssert) HasNoRegionGroup() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("region_group")) + return a +} + +func (a *AccountShowOutputAssert) HasNoEdition() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("edition")) + return a +} + +func (a *AccountShowOutputAssert) HasNoAccountURL() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("account_url")) + return a +} + +func (a *AccountShowOutputAssert) HasNoCreatedOn() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return a +} + +func (a *AccountShowOutputAssert) HasNoComment() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return a +} + +func (a *AccountShowOutputAssert) HasNoAccountLocator() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("account_locator")) + return a +} + +func (a *AccountShowOutputAssert) HasNoAccountLocatorUrl() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("account_locator_url")) + return a +} + +func (a *AccountShowOutputAssert) HasNoManagedAccounts() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputIntValueNotSet("managed_accounts")) + return a +} + +func (a *AccountShowOutputAssert) HasNoConsumptionBillingEntityName() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("consumption_billing_entity_name")) + return a +} + +func (a *AccountShowOutputAssert) HasNoMarketplaceConsumerBillingEntityName() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("marketplace_consumer_billing_entity_name")) + return a +} + +func (a *AccountShowOutputAssert) HasNoMarketplaceProviderBillingEntityName() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("marketplace_provider_billing_entity_name")) + return a +} + +func (a *AccountShowOutputAssert) HasNoOldAccountURL() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("old_account_url")) + return a +} + +func (a *AccountShowOutputAssert) HasNoIsOrgAdmin() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_org_admin")) + return a +} + +func (a *AccountShowOutputAssert) HasNoAccountOldUrlSavedOn() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("account_old_url_saved_on")) + return a +} + +func (a *AccountShowOutputAssert) HasNoAccountOldUrlLastUsed() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("account_old_url_last_used")) + return a +} + +func (a *AccountShowOutputAssert) HasNoOrganizationOldUrl() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("organization_old_url")) + return a +} + +func (a *AccountShowOutputAssert) HasNoOrganizationOldUrlSavedOn() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("organization_old_url_saved_on")) + return a +} + +func (a *AccountShowOutputAssert) HasNoOrganizationOldUrlLastUsed() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("organization_old_url_last_used")) + return a +} + +func (a *AccountShowOutputAssert) HasNoIsEventsAccount() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_events_account")) + return a +} + +func (a *AccountShowOutputAssert) HasNoIsOrganizationAccount() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_organization_account")) + return a +} + +func (a *AccountShowOutputAssert) HasNoDroppedOn() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("dropped_on")) + return a +} + +func (a *AccountShowOutputAssert) HasNoScheduledDeletionTime() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("scheduled_deletion_time")) + return a +} + +func (a *AccountShowOutputAssert) HasNoRestoredOn() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("restored_on")) + return a +} + +func (a *AccountShowOutputAssert) HasNoMovedToOrganization() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("moved_to_organization")) + return a +} + +func (a *AccountShowOutputAssert) HasNoMovedOn() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("moved_on")) + return a +} + +func (a *AccountShowOutputAssert) HasNoOrganizationUrlExpirationOn() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("organization_url_expiration_on")) + return a +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (a *AccountShowOutputAssert) HasOrganizationNameEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("organization_name", "")) + return a +} + +func (a *AccountShowOutputAssert) HasAccountNameEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("account_name", "")) + return a +} + +func (a *AccountShowOutputAssert) HasSnowflakeRegionEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("snowflake_region", "")) + return a +} + +func (a *AccountShowOutputAssert) HasRegionGroupEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("region_group", "")) + return a +} + +func (a *AccountShowOutputAssert) HasAccountURLEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("account_url", "")) + return a +} + +func (a *AccountShowOutputAssert) HasCommentEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return a +} + +func (a *AccountShowOutputAssert) HasAccountLocatorEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("account_locator", "")) + return a +} + +func (a *AccountShowOutputAssert) HasAccountLocatorUrlEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("account_locator_url", "")) + return a +} + +func (a *AccountShowOutputAssert) HasConsumptionBillingEntityNameEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("consumption_billing_entity_name", "")) + return a +} + +func (a *AccountShowOutputAssert) HasMarketplaceConsumerBillingEntityNameEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("marketplace_consumer_billing_entity_name", "")) + return a +} + +func (a *AccountShowOutputAssert) HasMarketplaceProviderBillingEntityNameEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("marketplace_provider_billing_entity_name", "")) + return a +} + +func (a *AccountShowOutputAssert) HasOldAccountURLEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("old_account_url", "")) + return a +} + +func (a *AccountShowOutputAssert) HasOrganizationOldUrlEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("organization_old_url", "")) + return a +} + +func (a *AccountShowOutputAssert) HasMovedToOrganizationEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("moved_to_organization", "")) + return a +} + +func (a *AccountShowOutputAssert) HasMovedOnEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("moved_on", "")) + return a +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (a *AccountShowOutputAssert) HasOrganizationNameNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("organization_name")) + return a +} + +func (a *AccountShowOutputAssert) HasAccountNameNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("account_name")) + return a +} + +func (a *AccountShowOutputAssert) HasSnowflakeRegionNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("snowflake_region")) + return a +} + +func (a *AccountShowOutputAssert) HasRegionGroupNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("region_group")) + return a +} + +func (a *AccountShowOutputAssert) HasEditionNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("edition")) + return a +} + +func (a *AccountShowOutputAssert) HasAccountURLNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("account_url")) + return a +} + +func (a *AccountShowOutputAssert) HasCreatedOnNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return a +} + +func (a *AccountShowOutputAssert) HasCommentNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return a +} + +func (a *AccountShowOutputAssert) HasAccountLocatorNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("account_locator")) + return a +} + +func (a *AccountShowOutputAssert) HasAccountLocatorUrlNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("account_locator_url")) + return a +} + +func (a *AccountShowOutputAssert) HasManagedAccountsNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputIntValuePresent("managed_accounts")) + return a +} + +func (a *AccountShowOutputAssert) HasConsumptionBillingEntityNameNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("consumption_billing_entity_name")) + return a +} + +func (a *AccountShowOutputAssert) HasMarketplaceConsumerBillingEntityNameNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("marketplace_consumer_billing_entity_name")) + return a +} + +func (a *AccountShowOutputAssert) HasMarketplaceProviderBillingEntityNameNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("marketplace_provider_billing_entity_name")) + return a +} + +func (a *AccountShowOutputAssert) HasOldAccountURLNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("old_account_url")) + return a +} + +func (a *AccountShowOutputAssert) HasIsOrgAdminNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_org_admin")) + return a +} + +func (a *AccountShowOutputAssert) HasAccountOldUrlSavedOnNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("account_old_url_saved_on")) + return a +} + +func (a *AccountShowOutputAssert) HasAccountOldUrlLastUsedNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("account_old_url_last_used")) + return a +} + +func (a *AccountShowOutputAssert) HasOrganizationOldUrlNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("organization_old_url")) + return a +} + +func (a *AccountShowOutputAssert) HasOrganizationOldUrlSavedOnNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("organization_old_url_saved_on")) + return a +} + +func (a *AccountShowOutputAssert) HasOrganizationOldUrlLastUsedNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("organization_old_url_last_used")) + return a +} + +func (a *AccountShowOutputAssert) HasIsEventsAccountNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_events_account")) + return a +} + +func (a *AccountShowOutputAssert) HasIsOrganizationAccountNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_organization_account")) + return a +} + +func (a *AccountShowOutputAssert) HasDroppedOnNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("dropped_on")) + return a +} + +func (a *AccountShowOutputAssert) HasScheduledDeletionTimeNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("scheduled_deletion_time")) + return a +} + +func (a *AccountShowOutputAssert) HasRestoredOnNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("restored_on")) + return a +} + +func (a *AccountShowOutputAssert) HasMovedToOrganizationNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("moved_to_organization")) + return a +} + +func (a *AccountShowOutputAssert) HasMovedOnNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("moved_on")) + return a +} + +func (a *AccountShowOutputAssert) HasOrganizationUrlExpirationOnNotEmpty() *AccountShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("organization_url_expiration_on")) + return a +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/authentication_policy_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/authentication_policy_show_output_gen.go index ea399f6fc4..cc6c6ce98e 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/authentication_policy_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/authentication_policy_show_output_gen.go @@ -19,21 +19,21 @@ type AuthenticationPolicyShowOutputAssert struct { func AuthenticationPolicyShowOutput(t *testing.T, name string) *AuthenticationPolicyShowOutputAssert { t.Helper() - a := AuthenticationPolicyShowOutputAssert{ + authenticationPolicyAssert := AuthenticationPolicyShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - a.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &a + authenticationPolicyAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &authenticationPolicyAssert } func ImportedAuthenticationPolicyShowOutput(t *testing.T, id string) *AuthenticationPolicyShowOutputAssert { t.Helper() - a := AuthenticationPolicyShowOutputAssert{ + authenticationPolicyAssert := AuthenticationPolicyShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - a.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &a + authenticationPolicyAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &authenticationPolicyAssert } //////////////////////////// @@ -79,3 +79,135 @@ func (a *AuthenticationPolicyShowOutputAssert) HasOptions(expected string) *Auth a.AddAssertion(assert.ResourceShowOutputValueSet("options", expected)) return a } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (a *AuthenticationPolicyShowOutputAssert) HasNoCreatedOn() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasNoName() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasNoComment() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasNoDatabaseName() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("database_name")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasNoSchemaName() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("schema_name")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasNoOwner() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasNoOwnerRoleType() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasNoOptions() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueNotSet("options")) + return a +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (a *AuthenticationPolicyShowOutputAssert) HasCreatedOnEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("created_on", "")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasNameEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasCommentEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasDatabaseNameEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("database_name", "")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasSchemaNameEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("schema_name", "")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasOwnerEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasOwnerRoleTypeEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasOptionsEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValueSet("options", "")) + return a +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (a *AuthenticationPolicyShowOutputAssert) HasCreatedOnNotEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasNameNotEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasCommentNotEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasDatabaseNameNotEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("database_name")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasSchemaNameNotEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("schema_name")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasOwnerNotEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasOwnerRoleTypeNotEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return a +} + +func (a *AuthenticationPolicyShowOutputAssert) HasOptionsNotEmpty() *AuthenticationPolicyShowOutputAssert { + a.AddAssertion(assert.ResourceShowOutputValuePresent("options")) + return a +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/connection_show_output_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/connection_show_output_ext.go index 1e45b6794e..bf364cd5a3 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/connection_show_output_ext.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/connection_show_output_ext.go @@ -7,17 +7,12 @@ import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk" ) -func (c *ConnectionShowOutputAssert) HasCreatedOnNotEmpty() *ConnectionShowOutputAssert { - c.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) - return c -} - func (c *ConnectionShowOutputAssert) HasPrimaryIdentifier(expected sdk.ExternalObjectIdentifier) *ConnectionShowOutputAssert { c.AddAssertion(assert.ResourceShowOutputValueSet("primary", expected.FullyQualifiedName())) return c } -func (c *ConnectionShowOutputAssert) HasFailoverAllowedToAccounts(expected ...sdk.AccountIdentifier) *ConnectionShowOutputAssert { +func (c *ConnectionShowOutputAssert) HasFailoverAllowedToAccountsList(expected ...sdk.AccountIdentifier) *ConnectionShowOutputAssert { c.AddAssertion(assert.ResourceShowOutputValueSet("failover_allowed_to_accounts.#", fmt.Sprintf("%d", len(expected)))) for i, v := range expected { c.AddAssertion(assert.ResourceShowOutputValueSet(fmt.Sprintf("failover_allowed_to_accounts.%d", i), v.Name())) diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/connection_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/connection_show_output_gen.go index d0e76f836a..8ca1a57586 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/connection_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/connection_show_output_gen.go @@ -3,6 +3,7 @@ package resourceshowoutputassert import ( + "fmt" "testing" "time" @@ -20,21 +21,21 @@ type ConnectionShowOutputAssert struct { func ConnectionShowOutput(t *testing.T, name string) *ConnectionShowOutputAssert { t.Helper() - c := ConnectionShowOutputAssert{ + connectionAssert := ConnectionShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - c.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &c + connectionAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &connectionAssert } func ImportedConnectionShowOutput(t *testing.T, id string) *ConnectionShowOutputAssert { t.Helper() - c := ConnectionShowOutputAssert{ + connectionAssert := ConnectionShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - c.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &c + connectionAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &connectionAssert } //////////////////////////// @@ -76,17 +77,15 @@ func (c *ConnectionShowOutputAssert) HasIsPrimary(expected bool) *ConnectionShow return c } -func (c *ConnectionShowOutputAssert) HasPrimary(expected string) *ConnectionShowOutputAssert { - c.AddAssertion(assert.ResourceShowOutputValueSet("primary", expected)) +func (c *ConnectionShowOutputAssert) HasPrimary(expected sdk.ExternalObjectIdentifier) *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueSet("primary", expected.FullyQualifiedName())) return c } -/* -func (c *ConnectionShowOutputAssert) HasFailoverAllowedToAccounts(expected []string) *ConnectionShowOutputAssert { - c.AddAssertion(assert.ResourceShowOutputValueSet("failover_allowed_to_accounts", expected)) +func (c *ConnectionShowOutputAssert) HasFailoverAllowedToAccounts(expected []sdk.AccountIdentifier) *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueSet("failover_allowed_to_accounts", fmt.Sprintf("%v", expected))) return c } -*/ func (c *ConnectionShowOutputAssert) HasConnectionUrl(expected string) *ConnectionShowOutputAssert { c.AddAssertion(assert.ResourceShowOutputValueSet("connection_url", expected)) @@ -102,3 +101,175 @@ func (c *ConnectionShowOutputAssert) HasAccountLocator(expected string) *Connect c.AddAssertion(assert.ResourceShowOutputValueSet("account_locator", expected)) return c } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (c *ConnectionShowOutputAssert) HasNoRegionGroup() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueNotSet("region_group")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoSnowflakeRegion() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueNotSet("snowflake_region")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoCreatedOn() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoAccountName() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueNotSet("account_name")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoName() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoComment() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoIsPrimary() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_primary")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoPrimary() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("primary")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoFailoverAllowedToAccounts() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueNotSet("failover_allowed_to_accounts")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoConnectionUrl() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueNotSet("connection_url")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoOrganizationName() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueNotSet("organization_name")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNoAccountLocator() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueNotSet("account_locator")) + return c +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (c *ConnectionShowOutputAssert) HasRegionGroupEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueSet("region_group", "")) + return c +} + +func (c *ConnectionShowOutputAssert) HasSnowflakeRegionEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueSet("snowflake_region", "")) + return c +} + +func (c *ConnectionShowOutputAssert) HasAccountNameEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueSet("account_name", "")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNameEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return c +} + +func (c *ConnectionShowOutputAssert) HasCommentEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return c +} + +func (c *ConnectionShowOutputAssert) HasConnectionUrlEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueSet("connection_url", "")) + return c +} + +func (c *ConnectionShowOutputAssert) HasOrganizationNameEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueSet("organization_name", "")) + return c +} + +func (c *ConnectionShowOutputAssert) HasAccountLocatorEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValueSet("account_locator", "")) + return c +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (c *ConnectionShowOutputAssert) HasRegionGroupNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValuePresent("region_group")) + return c +} + +func (c *ConnectionShowOutputAssert) HasSnowflakeRegionNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValuePresent("snowflake_region")) + return c +} + +func (c *ConnectionShowOutputAssert) HasCreatedOnNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return c +} + +func (c *ConnectionShowOutputAssert) HasAccountNameNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValuePresent("account_name")) + return c +} + +func (c *ConnectionShowOutputAssert) HasNameNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return c +} + +func (c *ConnectionShowOutputAssert) HasCommentNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return c +} + +func (c *ConnectionShowOutputAssert) HasIsPrimaryNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_primary")) + return c +} + +func (c *ConnectionShowOutputAssert) HasPrimaryNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("primary")) + return c +} + +func (c *ConnectionShowOutputAssert) HasFailoverAllowedToAccountsNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValuePresent("failover_allowed_to_accounts")) + return c +} + +func (c *ConnectionShowOutputAssert) HasConnectionUrlNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValuePresent("connection_url")) + return c +} + +func (c *ConnectionShowOutputAssert) HasOrganizationNameNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValuePresent("organization_name")) + return c +} + +func (c *ConnectionShowOutputAssert) HasAccountLocatorNotEmpty() *ConnectionShowOutputAssert { + c.AddAssertion(assert.ResourceShowOutputValuePresent("account_locator")) + return c +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/database_role_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/database_role_show_output_gen.go index b4e699ca62..4eda0d6662 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/database_role_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/database_role_show_output_gen.go @@ -19,21 +19,21 @@ type DatabaseRoleShowOutputAssert struct { func DatabaseRoleShowOutput(t *testing.T, name string) *DatabaseRoleShowOutputAssert { t.Helper() - d := DatabaseRoleShowOutputAssert{ + databaseRoleAssert := DatabaseRoleShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - d.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &d + databaseRoleAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &databaseRoleAssert } func ImportedDatabaseRoleShowOutput(t *testing.T, id string) *DatabaseRoleShowOutputAssert { t.Helper() - d := DatabaseRoleShowOutputAssert{ + databaseRoleAssert := DatabaseRoleShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - d.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &d + databaseRoleAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &databaseRoleAssert } //////////////////////////// @@ -99,3 +99,165 @@ func (d *DatabaseRoleShowOutputAssert) HasOwnerRoleType(expected string) *Databa d.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", expected)) return d } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (d *DatabaseRoleShowOutputAssert) HasNoCreatedOn() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoName() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoDatabaseName() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("database_name")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoIsDefault() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_default")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoIsCurrent() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_current")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoIsInherited() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_inherited")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoGrantedToRoles() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputIntValueNotSet("granted_to_roles")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoGrantedToDatabaseRoles() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputIntValueNotSet("granted_to_database_roles")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoGrantedDatabaseRoles() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputIntValueNotSet("granted_database_roles")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoOwner() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoComment() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNoOwnerRoleType() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return d +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (d *DatabaseRoleShowOutputAssert) HasCreatedOnEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("created_on", "")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNameEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasDatabaseNameEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("database_name", "")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasOwnerEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasCommentEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasOwnerRoleTypeEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return d +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (d *DatabaseRoleShowOutputAssert) HasCreatedOnNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasNameNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasDatabaseNameNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("database_name")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasIsDefaultNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_default")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasIsCurrentNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_current")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasIsInheritedNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_inherited")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasGrantedToRolesNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputIntValuePresent("granted_to_roles")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasGrantedToDatabaseRolesNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputIntValuePresent("granted_to_database_roles")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasGrantedDatabaseRolesNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputIntValuePresent("granted_database_roles")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasOwnerNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasCommentNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return d +} + +func (d *DatabaseRoleShowOutputAssert) HasOwnerRoleTypeNotEmpty() *DatabaseRoleShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return d +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/database_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/database_show_output_gen.go new file mode 100644 index 0000000000..ed60a5778c --- /dev/null +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/database_show_output_gen.go @@ -0,0 +1,299 @@ +// Code generated by assertions generator; DO NOT EDIT. + +package resourceshowoutputassert + +import ( + "testing" + "time" + + "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/bettertestspoc/assert" + "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk" +) + +// to ensure sdk package is used +var _ = sdk.Object{} + +type DatabaseShowOutputAssert struct { + *assert.ResourceAssert +} + +func DatabaseShowOutput(t *testing.T, name string) *DatabaseShowOutputAssert { + t.Helper() + + databaseAssert := DatabaseShowOutputAssert{ + ResourceAssert: assert.NewResourceAssert(name, "show_output"), + } + databaseAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &databaseAssert +} + +func ImportedDatabaseShowOutput(t *testing.T, id string) *DatabaseShowOutputAssert { + t.Helper() + + databaseAssert := DatabaseShowOutputAssert{ + ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), + } + databaseAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &databaseAssert +} + +//////////////////////////// +// Attribute value checks // +//////////////////////////// + +func (d *DatabaseShowOutputAssert) HasCreatedOn(expected time.Time) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("created_on", expected.String())) + return d +} + +func (d *DatabaseShowOutputAssert) HasName(expected string) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("name", expected)) + return d +} + +func (d *DatabaseShowOutputAssert) HasIsDefault(expected bool) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValueSet("is_default", expected)) + return d +} + +func (d *DatabaseShowOutputAssert) HasIsCurrent(expected bool) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValueSet("is_current", expected)) + return d +} + +func (d *DatabaseShowOutputAssert) HasOrigin(expected sdk.ExternalObjectIdentifier) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueSet("origin", expected.FullyQualifiedName())) + return d +} + +func (d *DatabaseShowOutputAssert) HasOwner(expected string) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("owner", expected)) + return d +} + +func (d *DatabaseShowOutputAssert) HasComment(expected string) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("comment", expected)) + return d +} + +func (d *DatabaseShowOutputAssert) HasOptions(expected string) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("options", expected)) + return d +} + +func (d *DatabaseShowOutputAssert) HasRetentionTime(expected int) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputIntValueSet("retention_time", expected)) + return d +} + +func (d *DatabaseShowOutputAssert) HasResourceGroup(expected string) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("resource_group", expected)) + return d +} + +func (d *DatabaseShowOutputAssert) HasDroppedOn(expected time.Time) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("dropped_on", expected.String())) + return d +} + +func (d *DatabaseShowOutputAssert) HasTransient(expected bool) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValueSet("transient", expected)) + return d +} + +func (d *DatabaseShowOutputAssert) HasKind(expected string) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("kind", expected)) + return d +} + +func (d *DatabaseShowOutputAssert) HasOwnerRoleType(expected string) *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", expected)) + return d +} + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (d *DatabaseShowOutputAssert) HasNoCreatedOn() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoName() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoIsDefault() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_default")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoIsCurrent() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_current")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoOrigin() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("origin")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoOwner() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoComment() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoOptions() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("options")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoRetentionTime() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputIntValueNotSet("retention_time")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoResourceGroup() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("resource_group")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoDroppedOn() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("dropped_on")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoTransient() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("transient")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoKind() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("kind")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNoOwnerRoleType() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return d +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (d *DatabaseShowOutputAssert) HasNameEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return d +} + +func (d *DatabaseShowOutputAssert) HasOwnerEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return d +} + +func (d *DatabaseShowOutputAssert) HasCommentEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return d +} + +func (d *DatabaseShowOutputAssert) HasOptionsEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("options", "")) + return d +} + +func (d *DatabaseShowOutputAssert) HasResourceGroupEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("resource_group", "")) + return d +} + +func (d *DatabaseShowOutputAssert) HasKindEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("kind", "")) + return d +} + +func (d *DatabaseShowOutputAssert) HasOwnerRoleTypeEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return d +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (d *DatabaseShowOutputAssert) HasCreatedOnNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return d +} + +func (d *DatabaseShowOutputAssert) HasNameNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return d +} + +func (d *DatabaseShowOutputAssert) HasIsDefaultNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_default")) + return d +} + +func (d *DatabaseShowOutputAssert) HasIsCurrentNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_current")) + return d +} + +func (d *DatabaseShowOutputAssert) HasOriginNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("origin")) + return d +} + +func (d *DatabaseShowOutputAssert) HasOwnerNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return d +} + +func (d *DatabaseShowOutputAssert) HasCommentNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return d +} + +func (d *DatabaseShowOutputAssert) HasOptionsNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("options")) + return d +} + +func (d *DatabaseShowOutputAssert) HasRetentionTimeNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputIntValuePresent("retention_time")) + return d +} + +func (d *DatabaseShowOutputAssert) HasResourceGroupNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("resource_group")) + return d +} + +func (d *DatabaseShowOutputAssert) HasDroppedOnNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("dropped_on")) + return d +} + +func (d *DatabaseShowOutputAssert) HasTransientNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputBoolValuePresent("transient")) + return d +} + +func (d *DatabaseShowOutputAssert) HasKindNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("kind")) + return d +} + +func (d *DatabaseShowOutputAssert) HasOwnerRoleTypeNotEmpty() *DatabaseShowOutputAssert { + d.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return d +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/external_volume_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/external_volume_show_output_gen.go index fc46379035..c1e90aace2 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/external_volume_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/external_volume_show_output_gen.go @@ -19,21 +19,21 @@ type ExternalVolumeShowOutputAssert struct { func ExternalVolumeShowOutput(t *testing.T, name string) *ExternalVolumeShowOutputAssert { t.Helper() - e := ExternalVolumeShowOutputAssert{ + externalVolumeAssert := ExternalVolumeShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - e.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &e + externalVolumeAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &externalVolumeAssert } func ImportedExternalVolumeShowOutput(t *testing.T, id string) *ExternalVolumeShowOutputAssert { t.Helper() - e := ExternalVolumeShowOutputAssert{ + externalVolumeAssert := ExternalVolumeShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - e.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &e + externalVolumeAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &externalVolumeAssert } //////////////////////////// @@ -45,8 +45,8 @@ func (e *ExternalVolumeShowOutputAssert) HasName(expected string) *ExternalVolum return e } -func (e *ExternalVolumeShowOutputAssert) HasAllowWrites(expected string) *ExternalVolumeShowOutputAssert { - e.AddAssertion(assert.ResourceShowOutputValueSet("allow_writes", expected)) +func (e *ExternalVolumeShowOutputAssert) HasAllowWrites(expected bool) *ExternalVolumeShowOutputAssert { + e.AddAssertion(assert.ResourceShowOutputBoolValueSet("allow_writes", expected)) return e } @@ -54,3 +54,55 @@ func (e *ExternalVolumeShowOutputAssert) HasComment(expected string) *ExternalVo e.AddAssertion(assert.ResourceShowOutputValueSet("comment", expected)) return e } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (e *ExternalVolumeShowOutputAssert) HasNoName() *ExternalVolumeShowOutputAssert { + e.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return e +} + +func (e *ExternalVolumeShowOutputAssert) HasNoAllowWrites() *ExternalVolumeShowOutputAssert { + e.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("allow_writes")) + return e +} + +func (e *ExternalVolumeShowOutputAssert) HasNoComment() *ExternalVolumeShowOutputAssert { + e.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return e +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (e *ExternalVolumeShowOutputAssert) HasNameEmpty() *ExternalVolumeShowOutputAssert { + e.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return e +} + +func (e *ExternalVolumeShowOutputAssert) HasCommentEmpty() *ExternalVolumeShowOutputAssert { + e.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return e +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (e *ExternalVolumeShowOutputAssert) HasNameNotEmpty() *ExternalVolumeShowOutputAssert { + e.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return e +} + +func (e *ExternalVolumeShowOutputAssert) HasAllowWritesNotEmpty() *ExternalVolumeShowOutputAssert { + e.AddAssertion(assert.ResourceShowOutputBoolValuePresent("allow_writes")) + return e +} + +func (e *ExternalVolumeShowOutputAssert) HasCommentNotEmpty() *ExternalVolumeShowOutputAssert { + e.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return e +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/function_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/function_show_output_gen.go index dc8fd54d38..6301b1df25 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/function_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/function_show_output_gen.go @@ -2,8 +2,8 @@ package resourceshowoutputassert -// imports edited manually import ( + "fmt" "testing" "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/bettertestspoc/assert" @@ -20,21 +20,21 @@ type FunctionShowOutputAssert struct { func FunctionShowOutput(t *testing.T, name string) *FunctionShowOutputAssert { t.Helper() - f := FunctionShowOutputAssert{ + functionAssert := FunctionShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - f.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &f + functionAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &functionAssert } func ImportedFunctionShowOutput(t *testing.T, id string) *FunctionShowOutputAssert { t.Helper() - f := FunctionShowOutputAssert{ + functionAssert := FunctionShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - f.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &f + functionAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &functionAssert } //////////////////////////// @@ -81,7 +81,10 @@ func (f *FunctionShowOutputAssert) HasMaxNumArguments(expected int) *FunctionSho return f } -// HasArgumentsOld removed manually +func (f *FunctionShowOutputAssert) HasArgumentsOld(expected []sdk.DataType) *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueSet("arguments_old", fmt.Sprintf("%v", expected))) + return f +} func (f *FunctionShowOutputAssert) HasArgumentsRaw(expected string) *FunctionShowOutputAssert { f.AddAssertion(assert.ResourceShowOutputValueSet("arguments_raw", expected)) @@ -142,3 +145,270 @@ func (f *FunctionShowOutputAssert) HasIsDataMetric(expected bool) *FunctionShowO f.AddAssertion(assert.ResourceShowOutputBoolValueSet("is_data_metric", expected)) return f } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (f *FunctionShowOutputAssert) HasNoCreatedOn() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoName() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoSchemaName() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueNotSet("schema_name")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoIsBuiltin() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_builtin")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoIsAggregate() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_aggregate")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoIsAnsi() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_ansi")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoMinNumArguments() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputIntValueNotSet("min_num_arguments")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoMaxNumArguments() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputIntValueNotSet("max_num_arguments")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoArgumentsOld() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueNotSet("arguments_old")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoArgumentsRaw() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueNotSet("arguments_raw")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoDescription() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueNotSet("description")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoCatalogName() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueNotSet("catalog_name")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoIsTableFunction() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_table_function")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoValidForClustering() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("valid_for_clustering")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoIsSecure() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_secure")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoSecrets() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueNotSet("secrets")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoExternalAccessIntegrations() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueNotSet("external_access_integrations")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoIsExternalFunction() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_external_function")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoLanguage() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueNotSet("language")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoIsMemoizable() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_memoizable")) + return f +} + +func (f *FunctionShowOutputAssert) HasNoIsDataMetric() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_data_metric")) + return f +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (f *FunctionShowOutputAssert) HasCreatedOnEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueSet("created_on", "")) + return f +} + +func (f *FunctionShowOutputAssert) HasNameEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return f +} + +func (f *FunctionShowOutputAssert) HasSchemaNameEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueSet("schema_name", "")) + return f +} + +func (f *FunctionShowOutputAssert) HasArgumentsRawEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueSet("arguments_raw", "")) + return f +} + +func (f *FunctionShowOutputAssert) HasDescriptionEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueSet("description", "")) + return f +} + +func (f *FunctionShowOutputAssert) HasCatalogNameEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueSet("catalog_name", "")) + return f +} + +func (f *FunctionShowOutputAssert) HasSecretsEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueSet("secrets", "")) + return f +} + +func (f *FunctionShowOutputAssert) HasExternalAccessIntegrationsEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueSet("external_access_integrations", "")) + return f +} + +func (f *FunctionShowOutputAssert) HasLanguageEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValueSet("language", "")) + return f +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (f *FunctionShowOutputAssert) HasCreatedOnNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return f +} + +func (f *FunctionShowOutputAssert) HasNameNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return f +} + +func (f *FunctionShowOutputAssert) HasSchemaNameNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValuePresent("schema_name")) + return f +} + +func (f *FunctionShowOutputAssert) HasIsBuiltinNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_builtin")) + return f +} + +func (f *FunctionShowOutputAssert) HasIsAggregateNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_aggregate")) + return f +} + +func (f *FunctionShowOutputAssert) HasIsAnsiNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_ansi")) + return f +} + +func (f *FunctionShowOutputAssert) HasMinNumArgumentsNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputIntValuePresent("min_num_arguments")) + return f +} + +func (f *FunctionShowOutputAssert) HasMaxNumArgumentsNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputIntValuePresent("max_num_arguments")) + return f +} + +func (f *FunctionShowOutputAssert) HasArgumentsOldNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValuePresent("arguments_old")) + return f +} + +func (f *FunctionShowOutputAssert) HasArgumentsRawNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValuePresent("arguments_raw")) + return f +} + +func (f *FunctionShowOutputAssert) HasDescriptionNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValuePresent("description")) + return f +} + +func (f *FunctionShowOutputAssert) HasCatalogNameNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValuePresent("catalog_name")) + return f +} + +func (f *FunctionShowOutputAssert) HasIsTableFunctionNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_table_function")) + return f +} + +func (f *FunctionShowOutputAssert) HasValidForClusteringNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValuePresent("valid_for_clustering")) + return f +} + +func (f *FunctionShowOutputAssert) HasIsSecureNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_secure")) + return f +} + +func (f *FunctionShowOutputAssert) HasSecretsNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValuePresent("secrets")) + return f +} + +func (f *FunctionShowOutputAssert) HasExternalAccessIntegrationsNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValuePresent("external_access_integrations")) + return f +} + +func (f *FunctionShowOutputAssert) HasIsExternalFunctionNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_external_function")) + return f +} + +func (f *FunctionShowOutputAssert) HasLanguageNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputValuePresent("language")) + return f +} + +func (f *FunctionShowOutputAssert) HasIsMemoizableNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_memoizable")) + return f +} + +func (f *FunctionShowOutputAssert) HasIsDataMetricNotEmpty() *FunctionShowOutputAssert { + f.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_data_metric")) + return f +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/masking_policy_show_output_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/masking_policy_show_output_ext.go index 2891acc1ca..8edc053426 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/masking_policy_show_output_ext.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/masking_policy_show_output_ext.go @@ -6,11 +6,6 @@ import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/bettertestspoc/assert" ) -func (p *MaskingPolicyShowOutputAssert) HasCreatedOnNotEmpty() *MaskingPolicyShowOutputAssert { - p.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) - return p -} - // MaskingPoliciesDatasourceShowOutput is a temporary workaround to have better show output assertions in data source acceptance tests. func MaskingPoliciesDatasourceShowOutput(t *testing.T, name string) *MaskingPolicyShowOutputAssert { t.Helper() diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/masking_policy_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/masking_policy_show_output_gen.go index a9cbf88887..f74dde777a 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/masking_policy_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/masking_policy_show_output_gen.go @@ -20,21 +20,21 @@ type MaskingPolicyShowOutputAssert struct { func MaskingPolicyShowOutput(t *testing.T, name string) *MaskingPolicyShowOutputAssert { t.Helper() - m := MaskingPolicyShowOutputAssert{ + maskingPolicyAssert := MaskingPolicyShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - m.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &m + maskingPolicyAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &maskingPolicyAssert } func ImportedMaskingPolicyShowOutput(t *testing.T, id string) *MaskingPolicyShowOutputAssert { t.Helper() - m := MaskingPolicyShowOutputAssert{ + maskingPolicyAssert := MaskingPolicyShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - m.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &m + maskingPolicyAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &maskingPolicyAssert } //////////////////////////// @@ -85,3 +85,140 @@ func (m *MaskingPolicyShowOutputAssert) HasOwnerRoleType(expected string) *Maski m.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", expected)) return m } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (m *MaskingPolicyShowOutputAssert) HasNoCreatedOn() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasNoName() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasNoDatabaseName() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueNotSet("database_name")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasNoSchemaName() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueNotSet("schema_name")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasNoKind() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueNotSet("kind")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasNoOwner() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasNoComment() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasNoExemptOtherPolicies() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("exempt_other_policies")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasNoOwnerRoleType() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return m +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (m *MaskingPolicyShowOutputAssert) HasNameEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasDatabaseNameEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueSet("database_name", "")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasSchemaNameEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueSet("schema_name", "")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasKindEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueSet("kind", "")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasOwnerEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasCommentEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasOwnerRoleTypeEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return m +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (m *MaskingPolicyShowOutputAssert) HasCreatedOnNotEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasNameNotEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasDatabaseNameNotEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValuePresent("database_name")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasSchemaNameNotEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValuePresent("schema_name")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasKindNotEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValuePresent("kind")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasOwnerNotEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasCommentNotEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasExemptOtherPoliciesNotEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputBoolValuePresent("exempt_other_policies")) + return m +} + +func (m *MaskingPolicyShowOutputAssert) HasOwnerRoleTypeNotEmpty() *MaskingPolicyShowOutputAssert { + m.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return m +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/procedure_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/procedure_show_output_gen.go index f9f6ed5831..a816d8d3fd 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/procedure_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/procedure_show_output_gen.go @@ -2,8 +2,8 @@ package resourceshowoutputassert -// imports edited manually import ( + "fmt" "testing" "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/bettertestspoc/assert" @@ -20,21 +20,21 @@ type ProcedureShowOutputAssert struct { func ProcedureShowOutput(t *testing.T, name string) *ProcedureShowOutputAssert { t.Helper() - p := ProcedureShowOutputAssert{ + procedureAssert := ProcedureShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - p.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &p + procedureAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &procedureAssert } func ImportedProcedureShowOutput(t *testing.T, id string) *ProcedureShowOutputAssert { t.Helper() - p := ProcedureShowOutputAssert{ + procedureAssert := ProcedureShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - p.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &p + procedureAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &procedureAssert } //////////////////////////// @@ -81,7 +81,10 @@ func (p *ProcedureShowOutputAssert) HasMaxNumArguments(expected int) *ProcedureS return p } -// HasArgumentsOld removed manually +func (p *ProcedureShowOutputAssert) HasArgumentsOld(expected []sdk.DataType) *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueSet("arguments_old", fmt.Sprintf("%v", expected))) + return p +} func (p *ProcedureShowOutputAssert) HasArgumentsRaw(expected string) *ProcedureShowOutputAssert { p.AddAssertion(assert.ResourceShowOutputValueSet("arguments_raw", expected)) @@ -122,3 +125,225 @@ func (p *ProcedureShowOutputAssert) HasExternalAccessIntegrations(expected strin p.AddAssertion(assert.ResourceShowOutputValueSet("external_access_integrations", expected)) return p } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (p *ProcedureShowOutputAssert) HasNoCreatedOn() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoName() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoSchemaName() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueNotSet("schema_name")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoIsBuiltin() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_builtin")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoIsAggregate() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_aggregate")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoIsAnsi() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_ansi")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoMinNumArguments() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputIntValueNotSet("min_num_arguments")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoMaxNumArguments() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputIntValueNotSet("max_num_arguments")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoArgumentsOld() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueNotSet("arguments_old")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoArgumentsRaw() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueNotSet("arguments_raw")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoDescription() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueNotSet("description")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoCatalogName() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueNotSet("catalog_name")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoIsTableFunction() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_table_function")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoValidForClustering() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("valid_for_clustering")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoIsSecure() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_secure")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoSecrets() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueNotSet("secrets")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNoExternalAccessIntegrations() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueNotSet("external_access_integrations")) + return p +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (p *ProcedureShowOutputAssert) HasCreatedOnEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueSet("created_on", "")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNameEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return p +} + +func (p *ProcedureShowOutputAssert) HasSchemaNameEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueSet("schema_name", "")) + return p +} + +func (p *ProcedureShowOutputAssert) HasArgumentsRawEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueSet("arguments_raw", "")) + return p +} + +func (p *ProcedureShowOutputAssert) HasDescriptionEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueSet("description", "")) + return p +} + +func (p *ProcedureShowOutputAssert) HasCatalogNameEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueSet("catalog_name", "")) + return p +} + +func (p *ProcedureShowOutputAssert) HasSecretsEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueSet("secrets", "")) + return p +} + +func (p *ProcedureShowOutputAssert) HasExternalAccessIntegrationsEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValueSet("external_access_integrations", "")) + return p +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (p *ProcedureShowOutputAssert) HasCreatedOnNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return p +} + +func (p *ProcedureShowOutputAssert) HasNameNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return p +} + +func (p *ProcedureShowOutputAssert) HasSchemaNameNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValuePresent("schema_name")) + return p +} + +func (p *ProcedureShowOutputAssert) HasIsBuiltinNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_builtin")) + return p +} + +func (p *ProcedureShowOutputAssert) HasIsAggregateNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_aggregate")) + return p +} + +func (p *ProcedureShowOutputAssert) HasIsAnsiNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_ansi")) + return p +} + +func (p *ProcedureShowOutputAssert) HasMinNumArgumentsNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputIntValuePresent("min_num_arguments")) + return p +} + +func (p *ProcedureShowOutputAssert) HasMaxNumArgumentsNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputIntValuePresent("max_num_arguments")) + return p +} + +func (p *ProcedureShowOutputAssert) HasArgumentsOldNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValuePresent("arguments_old")) + return p +} + +func (p *ProcedureShowOutputAssert) HasArgumentsRawNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValuePresent("arguments_raw")) + return p +} + +func (p *ProcedureShowOutputAssert) HasDescriptionNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValuePresent("description")) + return p +} + +func (p *ProcedureShowOutputAssert) HasCatalogNameNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValuePresent("catalog_name")) + return p +} + +func (p *ProcedureShowOutputAssert) HasIsTableFunctionNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_table_function")) + return p +} + +func (p *ProcedureShowOutputAssert) HasValidForClusteringNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValuePresent("valid_for_clustering")) + return p +} + +func (p *ProcedureShowOutputAssert) HasIsSecureNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_secure")) + return p +} + +func (p *ProcedureShowOutputAssert) HasSecretsNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValuePresent("secrets")) + return p +} + +func (p *ProcedureShowOutputAssert) HasExternalAccessIntegrationsNotEmpty() *ProcedureShowOutputAssert { + p.AddAssertion(assert.ResourceShowOutputValuePresent("external_access_integrations")) + return p +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/resource_monitor_show_output_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/resource_monitor_show_output_ext.go index aee983b4b9..f8ddede839 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/resource_monitor_show_output_ext.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/resource_monitor_show_output_ext.go @@ -16,23 +16,3 @@ func ResourceMonitorDatasourceShowOutput(t *testing.T, name string) *ResourceMon u.AddAssertion(assert.ValueSet("show_output.#", "1")) return &u } - -func (r *ResourceMonitorShowOutputAssert) HasStartTimeNotEmpty() *ResourceMonitorShowOutputAssert { - r.AddAssertion(assert.ResourceShowOutputValuePresent("start_time")) - return r -} - -func (r *ResourceMonitorShowOutputAssert) HasEndTimeNotEmpty() *ResourceMonitorShowOutputAssert { - r.AddAssertion(assert.ResourceShowOutputValuePresent("end_time")) - return r -} - -func (r *ResourceMonitorShowOutputAssert) HasCreatedOnNotEmpty() *ResourceMonitorShowOutputAssert { - r.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) - return r -} - -func (r *ResourceMonitorShowOutputAssert) HasOwnerNotEmpty() *ResourceMonitorShowOutputAssert { - r.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) - return r -} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/resource_monitor_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/resource_monitor_show_output_gen.go index 5ee1f9ee40..b669bf78e4 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/resource_monitor_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/resource_monitor_show_output_gen.go @@ -3,6 +3,7 @@ package resourceshowoutputassert import ( + "fmt" "testing" "time" @@ -20,21 +21,21 @@ type ResourceMonitorShowOutputAssert struct { func ResourceMonitorShowOutput(t *testing.T, name string) *ResourceMonitorShowOutputAssert { t.Helper() - r := ResourceMonitorShowOutputAssert{ + resourceMonitorAssert := ResourceMonitorShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - r.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &r + resourceMonitorAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &resourceMonitorAssert } func ImportedResourceMonitorShowOutput(t *testing.T, id string) *ResourceMonitorShowOutputAssert { t.Helper() - r := ResourceMonitorShowOutputAssert{ + resourceMonitorAssert := ResourceMonitorShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - r.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &r + resourceMonitorAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &resourceMonitorAssert } //////////////////////////// @@ -81,6 +82,11 @@ func (r *ResourceMonitorShowOutputAssert) HasEndTime(expected string) *ResourceM return r } +func (r *ResourceMonitorShowOutputAssert) HasNotifyAt(expected []int) *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("notify_at", fmt.Sprintf("%v", expected))) + return r +} + func (r *ResourceMonitorShowOutputAssert) HasSuspendAt(expected int) *ResourceMonitorShowOutputAssert { r.AddAssertion(assert.ResourceShowOutputIntValueSet("suspend_at", expected)) return r @@ -105,3 +111,195 @@ func (r *ResourceMonitorShowOutputAssert) HasComment(expected string) *ResourceM r.AddAssertion(assert.ResourceShowOutputValueSet("comment", expected)) return r } + +func (r *ResourceMonitorShowOutputAssert) HasNotifyUsers(expected []string) *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("notify_users", fmt.Sprintf("%v", expected))) + return r +} + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (r *ResourceMonitorShowOutputAssert) HasNoName() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoCreditQuota() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputFloatValueNotSet("credit_quota")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoUsedCredits() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputFloatValueNotSet("used_credits")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoRemainingCredits() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputFloatValueNotSet("remaining_credits")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoLevel() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("level")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoFrequency() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("frequency")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoStartTime() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("start_time")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoEndTime() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("end_time")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoNotifyAt() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("notify_at")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoSuspendAt() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputIntValueNotSet("suspend_at")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoSuspendImmediateAt() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputIntValueNotSet("suspend_immediate_at")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoCreatedOn() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoOwner() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoComment() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNoNotifyUsers() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("notify_users")) + return r +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (r *ResourceMonitorShowOutputAssert) HasNameEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasStartTimeEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("start_time", "")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasEndTimeEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("end_time", "")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasOwnerEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasCommentEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return r +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (r *ResourceMonitorShowOutputAssert) HasNameNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasCreditQuotaNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputFloatValuePresent("credit_quota")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasUsedCreditsNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputFloatValuePresent("used_credits")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasRemainingCreditsNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputFloatValuePresent("remaining_credits")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasLevelNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("level")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasFrequencyNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("frequency")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasStartTimeNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("start_time")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasEndTimeNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("end_time")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNotifyAtNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("notify_at")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasSuspendAtNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputIntValuePresent("suspend_at")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasSuspendImmediateAtNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputIntValuePresent("suspend_immediate_at")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasCreatedOnNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasOwnerNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasCommentNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return r +} + +func (r *ResourceMonitorShowOutputAssert) HasNotifyUsersNotEmpty() *ResourceMonitorShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("notify_users")) + return r +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/row_access_policy_show_output_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/row_access_policy_show_output_ext.go index d8a013f58c..9c855f0d49 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/row_access_policy_show_output_ext.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/row_access_policy_show_output_ext.go @@ -6,11 +6,6 @@ import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/bettertestspoc/assert" ) -func (r *RowAccessPolicyShowOutputAssert) HasCreatedOnNotEmpty() *RowAccessPolicyShowOutputAssert { - r.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) - return r -} - // RowAccessPoliciesDatasourceShowOutput is a temporary workaround to have better show output assertions in data source acceptance tests. func RowAccessPoliciesDatasourceShowOutput(t *testing.T, name string) *RowAccessPolicyShowOutputAssert { t.Helper() diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/row_access_policy_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/row_access_policy_show_output_gen.go index b08670ce73..b563a166ad 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/row_access_policy_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/row_access_policy_show_output_gen.go @@ -19,21 +19,21 @@ type RowAccessPolicyShowOutputAssert struct { func RowAccessPolicyShowOutput(t *testing.T, name string) *RowAccessPolicyShowOutputAssert { t.Helper() - r := RowAccessPolicyShowOutputAssert{ + rowAccessPolicyAssert := RowAccessPolicyShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - r.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &r + rowAccessPolicyAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &rowAccessPolicyAssert } func ImportedRowAccessPolicyShowOutput(t *testing.T, id string) *RowAccessPolicyShowOutputAssert { t.Helper() - r := RowAccessPolicyShowOutputAssert{ + rowAccessPolicyAssert := RowAccessPolicyShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - r.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &r + rowAccessPolicyAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &rowAccessPolicyAssert } //////////////////////////// @@ -84,3 +84,150 @@ func (r *RowAccessPolicyShowOutputAssert) HasOwnerRoleType(expected string) *Row r.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", expected)) return r } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (r *RowAccessPolicyShowOutputAssert) HasNoCreatedOn() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasNoName() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasNoDatabaseName() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("database_name")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasNoSchemaName() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("schema_name")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasNoKind() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("kind")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasNoOwner() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasNoComment() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasNoOptions() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("options")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasNoOwnerRoleType() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return r +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (r *RowAccessPolicyShowOutputAssert) HasCreatedOnEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("created_on", "")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasNameEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasDatabaseNameEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("database_name", "")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasSchemaNameEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("schema_name", "")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasKindEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("kind", "")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasOwnerEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasCommentEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasOptionsEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("options", "")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasOwnerRoleTypeEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return r +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (r *RowAccessPolicyShowOutputAssert) HasCreatedOnNotEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasNameNotEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasDatabaseNameNotEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("database_name")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasSchemaNameNotEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("schema_name")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasKindNotEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("kind")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasOwnerNotEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasCommentNotEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasOptionsNotEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("options")) + return r +} + +func (r *RowAccessPolicyShowOutputAssert) HasOwnerRoleTypeNotEmpty() *RowAccessPolicyShowOutputAssert { + r.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return r +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/secret_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/secret_show_output_gen.go index 665693da07..5dd46be480 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/secret_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/secret_show_output_gen.go @@ -3,6 +3,7 @@ package resourceshowoutputassert import ( + "fmt" "testing" "time" @@ -20,21 +21,21 @@ type SecretShowOutputAssert struct { func SecretShowOutput(t *testing.T, name string) *SecretShowOutputAssert { t.Helper() - s := SecretShowOutputAssert{ + secretAssert := SecretShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - s.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &s + secretAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &secretAssert } func ImportedSecretShowOutput(t *testing.T, id string) *SecretShowOutputAssert { t.Helper() - s := SecretShowOutputAssert{ + secretAssert := SecretShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - s.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &s + secretAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &secretAssert } //////////////////////////// @@ -76,7 +77,149 @@ func (s *SecretShowOutputAssert) HasSecretType(expected string) *SecretShowOutpu return s } +func (s *SecretShowOutputAssert) HasOauthScopes(expected []string) *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("oauth_scopes", fmt.Sprintf("%v", expected))) + return s +} + func (s *SecretShowOutputAssert) HasOwnerRoleType(expected string) *SecretShowOutputAssert { s.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", expected)) return s } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (s *SecretShowOutputAssert) HasNoCreatedOn() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return s +} + +func (s *SecretShowOutputAssert) HasNoName() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return s +} + +func (s *SecretShowOutputAssert) HasNoSchemaName() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("schema_name")) + return s +} + +func (s *SecretShowOutputAssert) HasNoDatabaseName() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("database_name")) + return s +} + +func (s *SecretShowOutputAssert) HasNoOwner() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return s +} + +func (s *SecretShowOutputAssert) HasNoComment() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return s +} + +func (s *SecretShowOutputAssert) HasNoSecretType() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("secret_type")) + return s +} + +func (s *SecretShowOutputAssert) HasNoOauthScopes() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("oauth_scopes")) + return s +} + +func (s *SecretShowOutputAssert) HasNoOwnerRoleType() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return s +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *SecretShowOutputAssert) HasNameEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return s +} + +func (s *SecretShowOutputAssert) HasSchemaNameEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("schema_name", "")) + return s +} + +func (s *SecretShowOutputAssert) HasDatabaseNameEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("database_name", "")) + return s +} + +func (s *SecretShowOutputAssert) HasOwnerEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return s +} + +func (s *SecretShowOutputAssert) HasCommentEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return s +} + +func (s *SecretShowOutputAssert) HasSecretTypeEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("secret_type", "")) + return s +} + +func (s *SecretShowOutputAssert) HasOwnerRoleTypeEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *SecretShowOutputAssert) HasCreatedOnNotEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return s +} + +func (s *SecretShowOutputAssert) HasNameNotEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return s +} + +func (s *SecretShowOutputAssert) HasSchemaNameNotEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("schema_name")) + return s +} + +func (s *SecretShowOutputAssert) HasDatabaseNameNotEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("database_name")) + return s +} + +func (s *SecretShowOutputAssert) HasOwnerNotEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return s +} + +func (s *SecretShowOutputAssert) HasCommentNotEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return s +} + +func (s *SecretShowOutputAssert) HasSecretTypeNotEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("secret_type")) + return s +} + +func (s *SecretShowOutputAssert) HasOauthScopesNotEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("oauth_scopes")) + return s +} + +func (s *SecretShowOutputAssert) HasOwnerRoleTypeNotEmpty() *SecretShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return s +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/stream_show_output_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/stream_show_output_ext.go index 0daeaf4db2..366c1913cf 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/stream_show_output_ext.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/stream_show_output_ext.go @@ -20,17 +20,7 @@ func StreamsDatasourceShowOutput(t *testing.T, name string) *StreamShowOutputAss return &s } -func (s *StreamShowOutputAssert) HasCreatedOnNotEmpty() *StreamShowOutputAssert { - s.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) - return s -} - -func (s *StreamShowOutputAssert) HasStaleAfterNotEmpty() *StreamShowOutputAssert { - s.AddAssertion(assert.ResourceShowOutputValuePresent("stale_after")) - return s -} - -func (s *StreamShowOutputAssert) HasBaseTables(ids ...sdk.SchemaObjectIdentifier) *StreamShowOutputAssert { +func (s *StreamShowOutputAssert) HasBaseTablesList(ids ...sdk.SchemaObjectIdentifier) *StreamShowOutputAssert { s.AddAssertion(assert.ResourceShowOutputValueSet("base_tables.#", strconv.FormatInt(int64(len(ids)), 10))) for i := range ids { s.AddAssertion(assert.ResourceShowOutputValueSet(fmt.Sprintf("base_tables.%d", i), ids[i].FullyQualifiedName())) diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/stream_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/stream_show_output_gen.go index 79c93d2beb..f1388775d6 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/stream_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/stream_show_output_gen.go @@ -3,6 +3,7 @@ package resourceshowoutputassert import ( + "fmt" "testing" "time" @@ -20,21 +21,21 @@ type StreamShowOutputAssert struct { func StreamShowOutput(t *testing.T, name string) *StreamShowOutputAssert { t.Helper() - s := StreamShowOutputAssert{ + streamAssert := StreamShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - s.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &s + streamAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &streamAssert } func ImportedStreamShowOutput(t *testing.T, id string) *StreamShowOutputAssert { t.Helper() - s := StreamShowOutputAssert{ + streamAssert := StreamShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - s.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &s + streamAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &streamAssert } //////////////////////////// @@ -81,13 +82,18 @@ func (s *StreamShowOutputAssert) HasSourceType(expected sdk.StreamSourceType) *S return s } +func (s *StreamShowOutputAssert) HasBaseTables(expected []string) *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("base_tables", fmt.Sprintf("%v", expected))) + return s +} + func (s *StreamShowOutputAssert) HasType(expected string) *StreamShowOutputAssert { s.AddAssertion(assert.ResourceShowOutputValueSet("type", expected)) return s } -func (s *StreamShowOutputAssert) HasStale(expected string) *StreamShowOutputAssert { - s.AddAssertion(assert.ResourceShowOutputValueSet("stale", expected)) +func (s *StreamShowOutputAssert) HasStale(expected bool) *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputBoolValueSet("stale", expected)) return s } @@ -110,3 +116,210 @@ func (s *StreamShowOutputAssert) HasOwnerRoleType(expected string) *StreamShowOu s.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", expected)) return s } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (s *StreamShowOutputAssert) HasNoCreatedOn() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return s +} + +func (s *StreamShowOutputAssert) HasNoName() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return s +} + +func (s *StreamShowOutputAssert) HasNoDatabaseName() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("database_name")) + return s +} + +func (s *StreamShowOutputAssert) HasNoSchemaName() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("schema_name")) + return s +} + +func (s *StreamShowOutputAssert) HasNoOwner() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return s +} + +func (s *StreamShowOutputAssert) HasNoComment() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return s +} + +func (s *StreamShowOutputAssert) HasNoTableName() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("table_name")) + return s +} + +func (s *StreamShowOutputAssert) HasNoSourceType() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("source_type")) + return s +} + +func (s *StreamShowOutputAssert) HasNoBaseTables() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("base_tables")) + return s +} + +func (s *StreamShowOutputAssert) HasNoType() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("type")) + return s +} + +func (s *StreamShowOutputAssert) HasNoStale() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("stale")) + return s +} + +func (s *StreamShowOutputAssert) HasNoMode() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("mode")) + return s +} + +func (s *StreamShowOutputAssert) HasNoStaleAfter() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("stale_after")) + return s +} + +func (s *StreamShowOutputAssert) HasNoInvalidReason() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("invalid_reason")) + return s +} + +func (s *StreamShowOutputAssert) HasNoOwnerRoleType() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return s +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (s *StreamShowOutputAssert) HasNameEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return s +} + +func (s *StreamShowOutputAssert) HasDatabaseNameEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("database_name", "")) + return s +} + +func (s *StreamShowOutputAssert) HasSchemaNameEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("schema_name", "")) + return s +} + +func (s *StreamShowOutputAssert) HasOwnerEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return s +} + +func (s *StreamShowOutputAssert) HasCommentEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return s +} + +func (s *StreamShowOutputAssert) HasTableNameEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("table_name", "")) + return s +} + +func (s *StreamShowOutputAssert) HasTypeEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("type", "")) + return s +} + +func (s *StreamShowOutputAssert) HasInvalidReasonEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("invalid_reason", "")) + return s +} + +func (s *StreamShowOutputAssert) HasOwnerRoleTypeEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return s +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (s *StreamShowOutputAssert) HasCreatedOnNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return s +} + +func (s *StreamShowOutputAssert) HasNameNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return s +} + +func (s *StreamShowOutputAssert) HasDatabaseNameNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("database_name")) + return s +} + +func (s *StreamShowOutputAssert) HasSchemaNameNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("schema_name")) + return s +} + +func (s *StreamShowOutputAssert) HasOwnerNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return s +} + +func (s *StreamShowOutputAssert) HasCommentNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return s +} + +func (s *StreamShowOutputAssert) HasTableNameNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("table_name")) + return s +} + +func (s *StreamShowOutputAssert) HasSourceTypeNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("source_type")) + return s +} + +func (s *StreamShowOutputAssert) HasBaseTablesNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("base_tables")) + return s +} + +func (s *StreamShowOutputAssert) HasTypeNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("type")) + return s +} + +func (s *StreamShowOutputAssert) HasStaleNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputBoolValuePresent("stale")) + return s +} + +func (s *StreamShowOutputAssert) HasModeNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("mode")) + return s +} + +func (s *StreamShowOutputAssert) HasStaleAfterNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("stale_after")) + return s +} + +func (s *StreamShowOutputAssert) HasInvalidReasonNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("invalid_reason")) + return s +} + +func (s *StreamShowOutputAssert) HasOwnerRoleTypeNotEmpty() *StreamShowOutputAssert { + s.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return s +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/tag_show_output_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/tag_show_output_ext.go index 46873a7668..9cc328f57e 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/tag_show_output_ext.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/tag_show_output_ext.go @@ -1,8 +1,6 @@ package resourceshowoutputassert import ( - "fmt" - "strconv" "testing" "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/bettertestspoc/assert" @@ -18,21 +16,3 @@ func TagsDatasourceShowOutput(t *testing.T, name string) *TagShowOutputAssert { s.AddAssertion(assert.ValueSet("show_output.#", "1")) return &s } - -func (s *TagShowOutputAssert) HasCreatedOnNotEmpty() *TagShowOutputAssert { - s.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) - return s -} - -func (s *TagShowOutputAssert) HasAllowedValues(expected ...string) *TagShowOutputAssert { - s.AddAssertion(assert.ResourceShowOutputValueSet("allowed_values.#", strconv.FormatInt(int64(len(expected)), 10))) - for i := range expected { - s.AddAssertion(assert.ResourceShowOutputValueSet(fmt.Sprintf("allowed_values.%d", i), expected[i])) - } - return s -} - -func (s *TagShowOutputAssert) HasNoAllowedValues(expected ...string) *TagShowOutputAssert { - s.AddAssertion(assert.ResourceShowOutputValueSet("allowed_values.#", "0")) - return s -} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/tag_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/tag_show_output_gen.go index fbf79c735f..cc6abc78c7 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/tag_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/tag_show_output_gen.go @@ -3,6 +3,7 @@ package resourceshowoutputassert import ( + "fmt" "testing" "time" @@ -20,21 +21,21 @@ type TagShowOutputAssert struct { func TagShowOutput(t *testing.T, name string) *TagShowOutputAssert { t.Helper() - tt := TagShowOutputAssert{ + tagAssert := TagShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - tt.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &tt + tagAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &tagAssert } func ImportedTagShowOutput(t *testing.T, id string) *TagShowOutputAssert { t.Helper() - tt := TagShowOutputAssert{ + tagAssert := TagShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - tt.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &tt + tagAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &tagAssert } //////////////////////////// @@ -71,7 +72,134 @@ func (t *TagShowOutputAssert) HasComment(expected string) *TagShowOutputAssert { return t } +func (t *TagShowOutputAssert) HasAllowedValues(expected []string) *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("allowed_values", fmt.Sprintf("%v", expected))) + return t +} + func (t *TagShowOutputAssert) HasOwnerRoleType(expected string) *TagShowOutputAssert { t.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", expected)) return t } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (t *TagShowOutputAssert) HasNoCreatedOn() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return t +} + +func (t *TagShowOutputAssert) HasNoName() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return t +} + +func (t *TagShowOutputAssert) HasNoDatabaseName() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("database_name")) + return t +} + +func (t *TagShowOutputAssert) HasNoSchemaName() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("schema_name")) + return t +} + +func (t *TagShowOutputAssert) HasNoOwner() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return t +} + +func (t *TagShowOutputAssert) HasNoComment() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return t +} + +func (t *TagShowOutputAssert) HasNoAllowedValues() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("allowed_values")) + return t +} + +func (t *TagShowOutputAssert) HasNoOwnerRoleType() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return t +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (t *TagShowOutputAssert) HasNameEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return t +} + +func (t *TagShowOutputAssert) HasDatabaseNameEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("database_name", "")) + return t +} + +func (t *TagShowOutputAssert) HasSchemaNameEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("schema_name", "")) + return t +} + +func (t *TagShowOutputAssert) HasOwnerEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return t +} + +func (t *TagShowOutputAssert) HasCommentEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return t +} + +func (t *TagShowOutputAssert) HasOwnerRoleTypeEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return t +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (t *TagShowOutputAssert) HasCreatedOnNotEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return t +} + +func (t *TagShowOutputAssert) HasNameNotEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return t +} + +func (t *TagShowOutputAssert) HasDatabaseNameNotEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("database_name")) + return t +} + +func (t *TagShowOutputAssert) HasSchemaNameNotEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("schema_name")) + return t +} + +func (t *TagShowOutputAssert) HasOwnerNotEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return t +} + +func (t *TagShowOutputAssert) HasCommentNotEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return t +} + +func (t *TagShowOutputAssert) HasAllowedValuesNotEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("allowed_values")) + return t +} + +func (t *TagShowOutputAssert) HasOwnerRoleTypeNotEmpty() *TagShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return t +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/task_show_output_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/task_show_output_ext.go index 2107ddd500..69cf77fc51 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/task_show_output_ext.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/task_show_output_ext.go @@ -25,32 +25,7 @@ func (t *TaskShowOutputAssert) HasErrorIntegrationEmpty() *TaskShowOutputAssert return t } -func (t *TaskShowOutputAssert) HasCreatedOnNotEmpty() *TaskShowOutputAssert { - t.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) - return t -} - -func (t *TaskShowOutputAssert) HasIdNotEmpty() *TaskShowOutputAssert { - t.AddAssertion(assert.ResourceShowOutputValuePresent("id")) - return t -} - -func (t *TaskShowOutputAssert) HasOwnerNotEmpty() *TaskShowOutputAssert { - t.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) - return t -} - -func (t *TaskShowOutputAssert) HasLastCommittedOnNotEmpty() *TaskShowOutputAssert { - t.AddAssertion(assert.ResourceShowOutputValuePresent("last_committed_on")) - return t -} - -func (t *TaskShowOutputAssert) HasLastSuspendedOnNotEmpty() *TaskShowOutputAssert { - t.AddAssertion(assert.ResourceShowOutputValuePresent("last_suspended_on")) - return t -} - -func (t *TaskShowOutputAssert) HasPredecessors(predecessors ...sdk.SchemaObjectIdentifier) *TaskShowOutputAssert { +func (t *TaskShowOutputAssert) HasPredecessorsList(predecessors ...sdk.SchemaObjectIdentifier) *TaskShowOutputAssert { t.AddAssertion(assert.ResourceShowOutputValueSet("predecessors.#", strconv.Itoa(len(predecessors)))) for i, predecessor := range predecessors { t.AddAssertion(assert.ResourceShowOutputValueSet(fmt.Sprintf("predecessors.%d", i), predecessor.FullyQualifiedName())) @@ -58,7 +33,7 @@ func (t *TaskShowOutputAssert) HasPredecessors(predecessors ...sdk.SchemaObjectI return t } -func (t *TaskShowOutputAssert) HasTaskRelations(expected sdk.TaskRelations) *TaskShowOutputAssert { +func (t *TaskShowOutputAssert) HasTaskRelationsObject(expected sdk.TaskRelations) *TaskShowOutputAssert { t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueSet("task_relations.#", "1")) t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueSet("task_relations.0.predecessors.#", strconv.Itoa(len(expected.Predecessors)))) for i, predecessor := range expected.Predecessors { @@ -73,11 +48,6 @@ func (t *TaskShowOutputAssert) HasTaskRelations(expected sdk.TaskRelations) *Tas return t } -func (t *TaskShowOutputAssert) HasNoSchedule() *TaskShowOutputAssert { - t.AddAssertion(assert.ResourceShowOutputValueSet("schedule", "")) - return t -} - func (t *TaskShowOutputAssert) HasScheduleMinutes(minutes int) *TaskShowOutputAssert { t.AddAssertion(assert.ResourceShowOutputValueSet("schedule", fmt.Sprintf("%d MINUTE", minutes))) return t diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/task_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/task_show_output_gen.go index 2b09ca5def..0cc2ce06a5 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/task_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/task_show_output_gen.go @@ -3,6 +3,7 @@ package resourceshowoutputassert import ( + "fmt" "testing" "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/bettertestspoc/assert" @@ -19,21 +20,21 @@ type TaskShowOutputAssert struct { func TaskShowOutput(t *testing.T, name string) *TaskShowOutputAssert { t.Helper() - task := TaskShowOutputAssert{ + taskAssert := TaskShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - task.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &task + taskAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &taskAssert } func ImportedTaskShowOutput(t *testing.T, id string) *TaskShowOutputAssert { t.Helper() - task := TaskShowOutputAssert{ + taskAssert := TaskShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - task.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &task + taskAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &taskAssert } //////////////////////////// @@ -85,6 +86,11 @@ func (t *TaskShowOutputAssert) HasSchedule(expected string) *TaskShowOutputAsser return t } +func (t *TaskShowOutputAssert) HasPredecessors(expected []sdk.SchemaObjectIdentifier) *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("predecessors", fmt.Sprintf("%v", expected))) + return t +} + func (t *TaskShowOutputAssert) HasState(expected sdk.TaskState) *TaskShowOutputAssert { t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueSet("state", expected)) return t @@ -139,3 +145,315 @@ func (t *TaskShowOutputAssert) HasLastSuspendedReason(expected string) *TaskShow t.AddAssertion(assert.ResourceShowOutputValueSet("last_suspended_reason", expected)) return t } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (t *TaskShowOutputAssert) HasNoCreatedOn() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return t +} + +func (t *TaskShowOutputAssert) HasNoName() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return t +} + +func (t *TaskShowOutputAssert) HasNoId() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("id")) + return t +} + +func (t *TaskShowOutputAssert) HasNoDatabaseName() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("database_name")) + return t +} + +func (t *TaskShowOutputAssert) HasNoSchemaName() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("schema_name")) + return t +} + +func (t *TaskShowOutputAssert) HasNoOwner() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return t +} + +func (t *TaskShowOutputAssert) HasNoComment() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return t +} + +func (t *TaskShowOutputAssert) HasNoWarehouse() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("warehouse")) + return t +} + +func (t *TaskShowOutputAssert) HasNoSchedule() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("schedule")) + return t +} + +func (t *TaskShowOutputAssert) HasNoPredecessors() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("predecessors")) + return t +} + +func (t *TaskShowOutputAssert) HasNoState() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("state")) + return t +} + +func (t *TaskShowOutputAssert) HasNoDefinition() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("definition")) + return t +} + +func (t *TaskShowOutputAssert) HasNoCondition() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("condition")) + return t +} + +func (t *TaskShowOutputAssert) HasNoAllowOverlappingExecution() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("allow_overlapping_execution")) + return t +} + +func (t *TaskShowOutputAssert) HasNoErrorIntegration() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("error_integration")) + return t +} + +func (t *TaskShowOutputAssert) HasNoLastCommittedOn() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("last_committed_on")) + return t +} + +func (t *TaskShowOutputAssert) HasNoLastSuspendedOn() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("last_suspended_on")) + return t +} + +func (t *TaskShowOutputAssert) HasNoOwnerRoleType() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return t +} + +func (t *TaskShowOutputAssert) HasNoConfig() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("config")) + return t +} + +func (t *TaskShowOutputAssert) HasNoBudget() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("budget")) + return t +} + +func (t *TaskShowOutputAssert) HasNoTaskRelations() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("task_relations")) + return t +} + +func (t *TaskShowOutputAssert) HasNoLastSuspendedReason() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueNotSet("last_suspended_reason")) + return t +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (t *TaskShowOutputAssert) HasCreatedOnEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("created_on", "")) + return t +} + +func (t *TaskShowOutputAssert) HasNameEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return t +} + +func (t *TaskShowOutputAssert) HasIdEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("id", "")) + return t +} + +func (t *TaskShowOutputAssert) HasDatabaseNameEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("database_name", "")) + return t +} + +func (t *TaskShowOutputAssert) HasSchemaNameEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("schema_name", "")) + return t +} + +func (t *TaskShowOutputAssert) HasOwnerEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return t +} + +func (t *TaskShowOutputAssert) HasCommentEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return t +} + +func (t *TaskShowOutputAssert) HasScheduleEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("schedule", "")) + return t +} + +func (t *TaskShowOutputAssert) HasDefinitionEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("definition", "")) + return t +} + +func (t *TaskShowOutputAssert) HasConditionEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("condition", "")) + return t +} + +func (t *TaskShowOutputAssert) HasLastCommittedOnEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("last_committed_on", "")) + return t +} + +func (t *TaskShowOutputAssert) HasLastSuspendedOnEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("last_suspended_on", "")) + return t +} + +func (t *TaskShowOutputAssert) HasOwnerRoleTypeEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return t +} + +func (t *TaskShowOutputAssert) HasConfigEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("config", "")) + return t +} + +func (t *TaskShowOutputAssert) HasBudgetEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("budget", "")) + return t +} + +func (t *TaskShowOutputAssert) HasLastSuspendedReasonEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValueSet("last_suspended_reason", "")) + return t +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (t *TaskShowOutputAssert) HasCreatedOnNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return t +} + +func (t *TaskShowOutputAssert) HasNameNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return t +} + +func (t *TaskShowOutputAssert) HasIdNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("id")) + return t +} + +func (t *TaskShowOutputAssert) HasDatabaseNameNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("database_name")) + return t +} + +func (t *TaskShowOutputAssert) HasSchemaNameNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("schema_name")) + return t +} + +func (t *TaskShowOutputAssert) HasOwnerNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return t +} + +func (t *TaskShowOutputAssert) HasCommentNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return t +} + +func (t *TaskShowOutputAssert) HasWarehouseNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("warehouse")) + return t +} + +func (t *TaskShowOutputAssert) HasScheduleNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("schedule")) + return t +} + +func (t *TaskShowOutputAssert) HasPredecessorsNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("predecessors")) + return t +} + +func (t *TaskShowOutputAssert) HasStateNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("state")) + return t +} + +func (t *TaskShowOutputAssert) HasDefinitionNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("definition")) + return t +} + +func (t *TaskShowOutputAssert) HasConditionNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("condition")) + return t +} + +func (t *TaskShowOutputAssert) HasAllowOverlappingExecutionNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputBoolValuePresent("allow_overlapping_execution")) + return t +} + +func (t *TaskShowOutputAssert) HasErrorIntegrationNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("error_integration")) + return t +} + +func (t *TaskShowOutputAssert) HasLastCommittedOnNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("last_committed_on")) + return t +} + +func (t *TaskShowOutputAssert) HasLastSuspendedOnNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("last_suspended_on")) + return t +} + +func (t *TaskShowOutputAssert) HasOwnerRoleTypeNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return t +} + +func (t *TaskShowOutputAssert) HasConfigNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("config")) + return t +} + +func (t *TaskShowOutputAssert) HasBudgetNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("budget")) + return t +} + +func (t *TaskShowOutputAssert) HasTaskRelationsNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("task_relations")) + return t +} + +func (t *TaskShowOutputAssert) HasLastSuspendedReasonNotEmpty() *TaskShowOutputAssert { + t.AddAssertion(assert.ResourceShowOutputValuePresent("last_suspended_reason")) + return t +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/user_show_output_ext.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/user_show_output_ext.go deleted file mode 100644 index 9daf9a672f..0000000000 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/user_show_output_ext.go +++ /dev/null @@ -1,25 +0,0 @@ -package resourceshowoutputassert - -import ( - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/bettertestspoc/assert" -) - -func (u *UserShowOutputAssert) HasCreatedOnNotEmpty() *UserShowOutputAssert { - u.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) - return u -} - -func (u *UserShowOutputAssert) HasDaysToExpiryNotEmpty() *UserShowOutputAssert { - u.AddAssertion(assert.ResourceShowOutputValuePresent("days_to_expiry")) - return u -} - -func (u *UserShowOutputAssert) HasMinsToUnlockNotEmpty() *UserShowOutputAssert { - u.AddAssertion(assert.ResourceShowOutputValuePresent("mins_to_unlock")) - return u -} - -func (u *UserShowOutputAssert) HasMinsToBypassMfaNotEmpty() *UserShowOutputAssert { - u.AddAssertion(assert.ResourceShowOutputValuePresent("mins_to_bypass_mfa")) - return u -} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/user_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/user_show_output_gen.go index 7d13a4e883..5c5f0eae79 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/user_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/user_show_output_gen.go @@ -20,21 +20,21 @@ type UserShowOutputAssert struct { func UserShowOutput(t *testing.T, name string) *UserShowOutputAssert { t.Helper() - u := UserShowOutputAssert{ + userAssert := UserShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - u.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &u + userAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &userAssert } func ImportedUserShowOutput(t *testing.T, id string) *UserShowOutputAssert { t.Helper() - u := UserShowOutputAssert{ + userAssert := UserShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - u.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &u + userAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &userAssert } //////////////////////////// @@ -180,3 +180,380 @@ func (u *UserShowOutputAssert) HasHasMfa(expected bool) *UserShowOutputAssert { u.AddAssertion(assert.ResourceShowOutputBoolValueSet("has_mfa", expected)) return u } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (u *UserShowOutputAssert) HasNoName() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return u +} + +func (u *UserShowOutputAssert) HasNoCreatedOn() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return u +} + +func (u *UserShowOutputAssert) HasNoLoginName() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("login_name")) + return u +} + +func (u *UserShowOutputAssert) HasNoDisplayName() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("display_name")) + return u +} + +func (u *UserShowOutputAssert) HasNoFirstName() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("first_name")) + return u +} + +func (u *UserShowOutputAssert) HasNoLastName() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("last_name")) + return u +} + +func (u *UserShowOutputAssert) HasNoEmail() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("email")) + return u +} + +func (u *UserShowOutputAssert) HasNoMinsToUnlock() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("mins_to_unlock")) + return u +} + +func (u *UserShowOutputAssert) HasNoDaysToExpiry() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("days_to_expiry")) + return u +} + +func (u *UserShowOutputAssert) HasNoComment() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return u +} + +func (u *UserShowOutputAssert) HasNoDisabled() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("disabled")) + return u +} + +func (u *UserShowOutputAssert) HasNoMustChangePassword() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("must_change_password")) + return u +} + +func (u *UserShowOutputAssert) HasNoSnowflakeLock() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("snowflake_lock")) + return u +} + +func (u *UserShowOutputAssert) HasNoDefaultWarehouse() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("default_warehouse")) + return u +} + +func (u *UserShowOutputAssert) HasNoDefaultNamespace() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("default_namespace")) + return u +} + +func (u *UserShowOutputAssert) HasNoDefaultRole() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("default_role")) + return u +} + +func (u *UserShowOutputAssert) HasNoDefaultSecondaryRoles() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("default_secondary_roles")) + return u +} + +func (u *UserShowOutputAssert) HasNoExtAuthnDuo() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("ext_authn_duo")) + return u +} + +func (u *UserShowOutputAssert) HasNoExtAuthnUid() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("ext_authn_uid")) + return u +} + +func (u *UserShowOutputAssert) HasNoMinsToBypassMfa() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("mins_to_bypass_mfa")) + return u +} + +func (u *UserShowOutputAssert) HasNoOwner() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return u +} + +func (u *UserShowOutputAssert) HasNoLastSuccessLogin() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("last_success_login")) + return u +} + +func (u *UserShowOutputAssert) HasNoExpiresAtTime() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("expires_at_time")) + return u +} + +func (u *UserShowOutputAssert) HasNoLockedUntilTime() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("locked_until_time")) + return u +} + +func (u *UserShowOutputAssert) HasNoHasPassword() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("has_password")) + return u +} + +func (u *UserShowOutputAssert) HasNoHasRsaPublicKey() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("has_rsa_public_key")) + return u +} + +func (u *UserShowOutputAssert) HasNoType() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueNotSet("type")) + return u +} + +func (u *UserShowOutputAssert) HasNoHasMfa() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("has_mfa")) + return u +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (u *UserShowOutputAssert) HasNameEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return u +} + +func (u *UserShowOutputAssert) HasLoginNameEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("login_name", "")) + return u +} + +func (u *UserShowOutputAssert) HasDisplayNameEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("display_name", "")) + return u +} + +func (u *UserShowOutputAssert) HasFirstNameEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("first_name", "")) + return u +} + +func (u *UserShowOutputAssert) HasLastNameEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("last_name", "")) + return u +} + +func (u *UserShowOutputAssert) HasEmailEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("email", "")) + return u +} + +func (u *UserShowOutputAssert) HasMinsToUnlockEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("mins_to_unlock", "")) + return u +} + +func (u *UserShowOutputAssert) HasDaysToExpiryEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("days_to_expiry", "")) + return u +} + +func (u *UserShowOutputAssert) HasCommentEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return u +} + +func (u *UserShowOutputAssert) HasDefaultWarehouseEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("default_warehouse", "")) + return u +} + +func (u *UserShowOutputAssert) HasDefaultNamespaceEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("default_namespace", "")) + return u +} + +func (u *UserShowOutputAssert) HasDefaultRoleEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("default_role", "")) + return u +} + +func (u *UserShowOutputAssert) HasDefaultSecondaryRolesEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("default_secondary_roles", "")) + return u +} + +func (u *UserShowOutputAssert) HasExtAuthnUidEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("ext_authn_uid", "")) + return u +} + +func (u *UserShowOutputAssert) HasMinsToBypassMfaEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("mins_to_bypass_mfa", "")) + return u +} + +func (u *UserShowOutputAssert) HasOwnerEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return u +} + +func (u *UserShowOutputAssert) HasTypeEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValueSet("type", "")) + return u +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (u *UserShowOutputAssert) HasNameNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return u +} + +func (u *UserShowOutputAssert) HasCreatedOnNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return u +} + +func (u *UserShowOutputAssert) HasLoginNameNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("login_name")) + return u +} + +func (u *UserShowOutputAssert) HasDisplayNameNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("display_name")) + return u +} + +func (u *UserShowOutputAssert) HasFirstNameNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("first_name")) + return u +} + +func (u *UserShowOutputAssert) HasLastNameNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("last_name")) + return u +} + +func (u *UserShowOutputAssert) HasEmailNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("email")) + return u +} + +func (u *UserShowOutputAssert) HasMinsToUnlockNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("mins_to_unlock")) + return u +} + +func (u *UserShowOutputAssert) HasDaysToExpiryNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("days_to_expiry")) + return u +} + +func (u *UserShowOutputAssert) HasCommentNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return u +} + +func (u *UserShowOutputAssert) HasDisabledNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValuePresent("disabled")) + return u +} + +func (u *UserShowOutputAssert) HasMustChangePasswordNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValuePresent("must_change_password")) + return u +} + +func (u *UserShowOutputAssert) HasSnowflakeLockNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValuePresent("snowflake_lock")) + return u +} + +func (u *UserShowOutputAssert) HasDefaultWarehouseNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("default_warehouse")) + return u +} + +func (u *UserShowOutputAssert) HasDefaultNamespaceNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("default_namespace")) + return u +} + +func (u *UserShowOutputAssert) HasDefaultRoleNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("default_role")) + return u +} + +func (u *UserShowOutputAssert) HasDefaultSecondaryRolesNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("default_secondary_roles")) + return u +} + +func (u *UserShowOutputAssert) HasExtAuthnDuoNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValuePresent("ext_authn_duo")) + return u +} + +func (u *UserShowOutputAssert) HasExtAuthnUidNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("ext_authn_uid")) + return u +} + +func (u *UserShowOutputAssert) HasMinsToBypassMfaNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("mins_to_bypass_mfa")) + return u +} + +func (u *UserShowOutputAssert) HasOwnerNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return u +} + +func (u *UserShowOutputAssert) HasLastSuccessLoginNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("last_success_login")) + return u +} + +func (u *UserShowOutputAssert) HasExpiresAtTimeNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("expires_at_time")) + return u +} + +func (u *UserShowOutputAssert) HasLockedUntilTimeNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("locked_until_time")) + return u +} + +func (u *UserShowOutputAssert) HasHasPasswordNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValuePresent("has_password")) + return u +} + +func (u *UserShowOutputAssert) HasHasRsaPublicKeyNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValuePresent("has_rsa_public_key")) + return u +} + +func (u *UserShowOutputAssert) HasTypeNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputValuePresent("type")) + return u +} + +func (u *UserShowOutputAssert) HasHasMfaNotEmpty() *UserShowOutputAssert { + u.AddAssertion(assert.ResourceShowOutputBoolValuePresent("has_mfa")) + return u +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/view_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/view_show_output_gen.go index 7b34df4371..cc3cd32d4f 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/view_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/view_show_output_gen.go @@ -19,21 +19,21 @@ type ViewShowOutputAssert struct { func ViewShowOutput(t *testing.T, name string) *ViewShowOutputAssert { t.Helper() - v := ViewShowOutputAssert{ + viewAssert := ViewShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - v.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &v + viewAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &viewAssert } func ImportedViewShowOutput(t *testing.T, id string) *ViewShowOutputAssert { t.Helper() - v := ViewShowOutputAssert{ + viewAssert := ViewShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - v.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &v + viewAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &viewAssert } //////////////////////////// @@ -104,3 +104,200 @@ func (v *ViewShowOutputAssert) HasChangeTracking(expected string) *ViewShowOutpu v.AddAssertion(assert.ResourceShowOutputValueSet("change_tracking", expected)) return v } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (v *ViewShowOutputAssert) HasNoCreatedOn() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return v +} + +func (v *ViewShowOutputAssert) HasNoName() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return v +} + +func (v *ViewShowOutputAssert) HasNoKind() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("kind")) + return v +} + +func (v *ViewShowOutputAssert) HasNoReserved() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("reserved")) + return v +} + +func (v *ViewShowOutputAssert) HasNoDatabaseName() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("database_name")) + return v +} + +func (v *ViewShowOutputAssert) HasNoSchemaName() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("schema_name")) + return v +} + +func (v *ViewShowOutputAssert) HasNoOwner() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return v +} + +func (v *ViewShowOutputAssert) HasNoComment() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return v +} + +func (v *ViewShowOutputAssert) HasNoText() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("text")) + return v +} + +func (v *ViewShowOutputAssert) HasNoIsSecure() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_secure")) + return v +} + +func (v *ViewShowOutputAssert) HasNoIsMaterialized() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_materialized")) + return v +} + +func (v *ViewShowOutputAssert) HasNoOwnerRoleType() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return v +} + +func (v *ViewShowOutputAssert) HasNoChangeTracking() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueNotSet("change_tracking")) + return v +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (v *ViewShowOutputAssert) HasCreatedOnEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("created_on", "")) + return v +} + +func (v *ViewShowOutputAssert) HasNameEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return v +} + +func (v *ViewShowOutputAssert) HasKindEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("kind", "")) + return v +} + +func (v *ViewShowOutputAssert) HasReservedEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("reserved", "")) + return v +} + +func (v *ViewShowOutputAssert) HasDatabaseNameEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("database_name", "")) + return v +} + +func (v *ViewShowOutputAssert) HasSchemaNameEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("schema_name", "")) + return v +} + +func (v *ViewShowOutputAssert) HasOwnerEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return v +} + +func (v *ViewShowOutputAssert) HasCommentEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return v +} + +func (v *ViewShowOutputAssert) HasTextEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("text", "")) + return v +} + +func (v *ViewShowOutputAssert) HasOwnerRoleTypeEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return v +} + +func (v *ViewShowOutputAssert) HasChangeTrackingEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValueSet("change_tracking", "")) + return v +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (v *ViewShowOutputAssert) HasCreatedOnNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return v +} + +func (v *ViewShowOutputAssert) HasNameNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return v +} + +func (v *ViewShowOutputAssert) HasKindNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("kind")) + return v +} + +func (v *ViewShowOutputAssert) HasReservedNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("reserved")) + return v +} + +func (v *ViewShowOutputAssert) HasDatabaseNameNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("database_name")) + return v +} + +func (v *ViewShowOutputAssert) HasSchemaNameNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("schema_name")) + return v +} + +func (v *ViewShowOutputAssert) HasOwnerNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return v +} + +func (v *ViewShowOutputAssert) HasCommentNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return v +} + +func (v *ViewShowOutputAssert) HasTextNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("text")) + return v +} + +func (v *ViewShowOutputAssert) HasIsSecureNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_secure")) + return v +} + +func (v *ViewShowOutputAssert) HasIsMaterializedNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_materialized")) + return v +} + +func (v *ViewShowOutputAssert) HasOwnerRoleTypeNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return v +} + +func (v *ViewShowOutputAssert) HasChangeTrackingNotEmpty() *ViewShowOutputAssert { + v.AddAssertion(assert.ResourceShowOutputValuePresent("change_tracking")) + return v +} diff --git a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/warehouse_show_output_gen.go b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/warehouse_show_output_gen.go index 173e2870ac..a427bbaa6b 100644 --- a/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/warehouse_show_output_gen.go +++ b/pkg/acceptance/bettertestspoc/assert/resourceshowoutputassert/warehouse_show_output_gen.go @@ -20,21 +20,21 @@ type WarehouseShowOutputAssert struct { func WarehouseShowOutput(t *testing.T, name string) *WarehouseShowOutputAssert { t.Helper() - w := WarehouseShowOutputAssert{ + warehouseAssert := WarehouseShowOutputAssert{ ResourceAssert: assert.NewResourceAssert(name, "show_output"), } - w.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &w + warehouseAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &warehouseAssert } func ImportedWarehouseShowOutput(t *testing.T, id string) *WarehouseShowOutputAssert { t.Helper() - w := WarehouseShowOutputAssert{ + warehouseAssert := WarehouseShowOutputAssert{ ResourceAssert: assert.NewImportedResourceAssert(id, "show_output"), } - w.AddAssertion(assert.ValueSet("show_output.#", "1")) - return &w + warehouseAssert.AddAssertion(assert.ValueSet("show_output.#", "1")) + return &warehouseAssert } //////////////////////////// @@ -175,3 +175,305 @@ func (w *WarehouseShowOutputAssert) HasOwnerRoleType(expected string) *Warehouse w.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", expected)) return w } + +/////////////////////////////// +// Attribute no value checks // +/////////////////////////////// + +func (w *WarehouseShowOutputAssert) HasNoName() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueNotSet("name")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoState() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("state")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoType() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("type")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoSize() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("size")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoMinClusterCount() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValueNotSet("min_cluster_count")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoMaxClusterCount() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValueNotSet("max_cluster_count")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoStartedClusters() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValueNotSet("started_clusters")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoRunning() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValueNotSet("running")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoQueued() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValueNotSet("queued")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoIsDefault() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_default")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoIsCurrent() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("is_current")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoAutoSuspend() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValueNotSet("auto_suspend")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoAutoResume() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("auto_resume")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoAvailable() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputFloatValueNotSet("available")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoProvisioning() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputFloatValueNotSet("provisioning")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoQuiescing() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputFloatValueNotSet("quiescing")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoOther() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputFloatValueNotSet("other")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoCreatedOn() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueNotSet("created_on")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoResumedOn() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueNotSet("resumed_on")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoUpdatedOn() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueNotSet("updated_on")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoOwner() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueNotSet("owner")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoComment() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueNotSet("comment")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoEnableQueryAcceleration() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputBoolValueNotSet("enable_query_acceleration")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoQueryAccelerationMaxScaleFactor() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValueNotSet("query_acceleration_max_scale_factor")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoResourceMonitor() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("resource_monitor")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoScalingPolicy() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputStringUnderlyingValueNotSet("scaling_policy")) + return w +} + +func (w *WarehouseShowOutputAssert) HasNoOwnerRoleType() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueNotSet("owner_role_type")) + return w +} + +//////////////////////////// +// Attribute empty checks // +//////////////////////////// + +func (w *WarehouseShowOutputAssert) HasNameEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueSet("name", "")) + return w +} + +func (w *WarehouseShowOutputAssert) HasOwnerEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueSet("owner", "")) + return w +} + +func (w *WarehouseShowOutputAssert) HasCommentEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueSet("comment", "")) + return w +} + +func (w *WarehouseShowOutputAssert) HasOwnerRoleTypeEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValueSet("owner_role_type", "")) + return w +} + +/////////////////////////////// +// Attribute presence checks // +/////////////////////////////// + +func (w *WarehouseShowOutputAssert) HasNameNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValuePresent("name")) + return w +} + +func (w *WarehouseShowOutputAssert) HasStateNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("state")) + return w +} + +func (w *WarehouseShowOutputAssert) HasTypeNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("type")) + return w +} + +func (w *WarehouseShowOutputAssert) HasSizeNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("size")) + return w +} + +func (w *WarehouseShowOutputAssert) HasMinClusterCountNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValuePresent("min_cluster_count")) + return w +} + +func (w *WarehouseShowOutputAssert) HasMaxClusterCountNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValuePresent("max_cluster_count")) + return w +} + +func (w *WarehouseShowOutputAssert) HasStartedClustersNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValuePresent("started_clusters")) + return w +} + +func (w *WarehouseShowOutputAssert) HasRunningNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValuePresent("running")) + return w +} + +func (w *WarehouseShowOutputAssert) HasQueuedNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValuePresent("queued")) + return w +} + +func (w *WarehouseShowOutputAssert) HasIsDefaultNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_default")) + return w +} + +func (w *WarehouseShowOutputAssert) HasIsCurrentNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputBoolValuePresent("is_current")) + return w +} + +func (w *WarehouseShowOutputAssert) HasAutoSuspendNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValuePresent("auto_suspend")) + return w +} + +func (w *WarehouseShowOutputAssert) HasAutoResumeNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputBoolValuePresent("auto_resume")) + return w +} + +func (w *WarehouseShowOutputAssert) HasAvailableNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputFloatValuePresent("available")) + return w +} + +func (w *WarehouseShowOutputAssert) HasProvisioningNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputFloatValuePresent("provisioning")) + return w +} + +func (w *WarehouseShowOutputAssert) HasQuiescingNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputFloatValuePresent("quiescing")) + return w +} + +func (w *WarehouseShowOutputAssert) HasOtherNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputFloatValuePresent("other")) + return w +} + +func (w *WarehouseShowOutputAssert) HasCreatedOnNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValuePresent("created_on")) + return w +} + +func (w *WarehouseShowOutputAssert) HasResumedOnNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValuePresent("resumed_on")) + return w +} + +func (w *WarehouseShowOutputAssert) HasUpdatedOnNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValuePresent("updated_on")) + return w +} + +func (w *WarehouseShowOutputAssert) HasOwnerNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValuePresent("owner")) + return w +} + +func (w *WarehouseShowOutputAssert) HasCommentNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValuePresent("comment")) + return w +} + +func (w *WarehouseShowOutputAssert) HasEnableQueryAccelerationNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputBoolValuePresent("enable_query_acceleration")) + return w +} + +func (w *WarehouseShowOutputAssert) HasQueryAccelerationMaxScaleFactorNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputIntValuePresent("query_acceleration_max_scale_factor")) + return w +} + +func (w *WarehouseShowOutputAssert) HasResourceMonitorNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("resource_monitor")) + return w +} + +func (w *WarehouseShowOutputAssert) HasScalingPolicyNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputStringUnderlyingValuePresent("scaling_policy")) + return w +} + +func (w *WarehouseShowOutputAssert) HasOwnerRoleTypeNotEmpty() *WarehouseShowOutputAssert { + w.AddAssertion(assert.ResourceShowOutputValuePresent("owner_role_type")) + return w +} diff --git a/pkg/datasources/connections_acceptance_test.go b/pkg/datasources/connections_acceptance_test.go index 0e91f4b6bd..d9242637ba 100644 --- a/pkg/datasources/connections_acceptance_test.go +++ b/pkg/datasources/connections_acceptance_test.go @@ -61,7 +61,7 @@ func TestAcc_Connections_Minimal(t *testing.T) { HasComment(""). HasIsPrimary(true). HasPrimaryIdentifier(primaryConnectionAsExternalId). - HasFailoverAllowedToAccounts(accountId). + HasFailoverAllowedToAccountsList(accountId). HasConnectionUrl( acc.TestClient().Connection.GetConnectionUrl(accountId.OrganizationName(), id.Name()), ), @@ -109,7 +109,7 @@ func TestAcc_Connections_Complete(t *testing.T) { HasComment("test comment"). HasIsPrimary(true). HasPrimaryIdentifier(primaryConnectionAsExternalId). - HasFailoverAllowedToAccounts(accountId, secondaryAccountId). + HasFailoverAllowedToAccountsList(accountId, secondaryAccountId). HasConnectionUrl( acc.TestClient().Connection.GetConnectionUrl(accountId.OrganizationName(), id.Name()), ), diff --git a/pkg/datasources/streams_acceptance_test.go b/pkg/datasources/streams_acceptance_test.go index 1b732d92c4..bd04fc5ee1 100644 --- a/pkg/datasources/streams_acceptance_test.go +++ b/pkg/datasources/streams_acceptance_test.go @@ -55,9 +55,9 @@ func TestAcc_Streams(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(table.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeTable). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -94,9 +94,9 @@ func TestAcc_Streams(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(table.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeTable). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -141,9 +141,9 @@ func TestAcc_StreamOnTable(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(table.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeTable). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -206,9 +206,9 @@ func TestAcc_StreamOnExternalTable(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(externalTable.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeExternalTable). - HasBaseTables(externalTable.ID()). + HasBaseTablesList(externalTable.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeInsertOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -267,7 +267,7 @@ func TestAcc_StreamOnDirectoryTable(t *testing.T) { HasSourceType(sdk.StreamSourceTypeStage). HasBaseTablesPartiallyQualified(stage.ID().Name()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeDefault). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -328,9 +328,9 @@ func TestAcc_StreamOnView(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(view.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeView). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). diff --git a/pkg/datasources/tasks_acceptance_test.go b/pkg/datasources/tasks_acceptance_test.go index 7358268599..33c2f22104 100644 --- a/pkg/datasources/tasks_acceptance_test.go +++ b/pkg/datasources/tasks_acceptance_test.go @@ -58,7 +58,7 @@ func TestAcc_Tasks_Like_RootTask(t *testing.T) { HasComment("some comment"). HasWarehouse(acc.TestClient().Ids.WarehouseId()). HasSchedule("1 MINUTE"). - HasPredecessors(). + HasPredecessorsList(). HasDefinition("SELECT 1"). HasCondition(""). HasAllowOverlappingExecution(true). @@ -68,7 +68,7 @@ func TestAcc_Tasks_Like_RootTask(t *testing.T) { HasOwnerRoleType("ROLE"). HasConfig(""). HasBudget(""). - HasTaskRelations(sdk.TaskRelations{}). + HasTaskRelationsObject(sdk.TaskRelations{}). HasLastSuspendedReason(""), resourceparametersassert.TaskDatasourceParameters(t, "snowflake_tasks.test"). HasAllDefaults(), diff --git a/pkg/resources/external_volume_acceptance_test.go b/pkg/resources/external_volume_acceptance_test.go index 0efb047ab3..a68ea4cf05 100644 --- a/pkg/resources/external_volume_acceptance_test.go +++ b/pkg/resources/external_volume_acceptance_test.go @@ -172,7 +172,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(""). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "3")), ), }, @@ -210,7 +210,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -255,7 +255,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "5")), ), }, @@ -290,7 +290,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -317,7 +317,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -344,7 +344,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -371,7 +371,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -398,7 +398,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -425,7 +425,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -470,7 +470,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "5")), ), }, @@ -505,7 +505,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -532,7 +532,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -559,7 +559,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -586,7 +586,7 @@ func TestAcc_External_Volume_S3(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(""). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "3")), ), }, @@ -649,7 +649,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(""). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "3")), ), }, @@ -687,7 +687,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -732,7 +732,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "5")), ), }, @@ -767,7 +767,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -794,7 +794,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -821,7 +821,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -848,7 +848,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -875,7 +875,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -920,7 +920,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "5")), ), }, @@ -955,7 +955,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -982,7 +982,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -1009,7 +1009,7 @@ func TestAcc_External_Volume_GCS(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(""). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "3")), ), }, @@ -1067,7 +1067,7 @@ func TestAcc_External_Volume_Azure(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(""). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "3")), ), }, @@ -1105,7 +1105,7 @@ func TestAcc_External_Volume_Azure(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -1150,7 +1150,7 @@ func TestAcc_External_Volume_Azure(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "5")), ), }, @@ -1185,7 +1185,7 @@ func TestAcc_External_Volume_Azure(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -1212,7 +1212,7 @@ func TestAcc_External_Volume_Azure(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment2). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "4")), ), }, @@ -1239,7 +1239,7 @@ func TestAcc_External_Volume_Azure(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(""). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "3")), ), }, @@ -1328,7 +1328,7 @@ func TestAcc_External_Volume_All_Options(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -1434,7 +1434,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -1489,7 +1489,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -1536,7 +1536,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -1593,7 +1593,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "7")), ), }, @@ -1640,7 +1640,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -1687,7 +1687,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -1734,7 +1734,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -1791,7 +1791,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "7")), ), }, @@ -1838,7 +1838,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -1885,7 +1885,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -1932,7 +1932,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -1989,7 +1989,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "7")), ), }, @@ -2036,7 +2036,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -2093,7 +2093,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "7")), ), }, @@ -2140,7 +2140,7 @@ func TestAcc_External_Volume_Multiple(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesTrue), + HasAllowWrites(true), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "6")), ), }, @@ -2206,7 +2206,7 @@ func TestAcc_External_Volume_External_Changes(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "5")), ), }, @@ -2294,7 +2294,7 @@ func TestAcc_External_Volume_External_Changes(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "5")), ), }, @@ -2334,7 +2334,7 @@ func TestAcc_External_Volume_External_Changes(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "5")), ), }, @@ -2376,7 +2376,7 @@ func TestAcc_External_Volume_External_Changes(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "5")), ), }, @@ -2418,7 +2418,7 @@ func TestAcc_External_Volume_External_Changes(t *testing.T) { resourceshowoutputassert.ExternalVolumeShowOutput(t, "snowflake_external_volume.complete"). HasName(externalVolumeName). HasComment(comment). - HasAllowWrites(allowWritesFalse), + HasAllowWrites(false), assert.Check(resource.TestCheckResourceAttr("snowflake_external_volume.complete", "describe_output.#", "5")), ), }, diff --git a/pkg/resources/function_javascript_acceptance_test.go b/pkg/resources/function_javascript_acceptance_test.go index 2ef1c7d7f7..9b51068e73 100644 --- a/pkg/resources/function_javascript_acceptance_test.go +++ b/pkg/resources/function_javascript_acceptance_test.go @@ -147,7 +147,7 @@ func TestAcc_FunctionJavascript_InlineFull(t *testing.T) { HasCommentString("some comment"). HasFunctionLanguageString("JAVASCRIPT"). HasNullInputBehaviorString(string(sdk.NullInputBehaviorReturnsNullInput)). - HasReturnBehaviorString(string(sdk.ReturnResultsBehaviorVolatile)). + HasReturnResultsBehaviorString(string(sdk.ReturnResultsBehaviorVolatile)). HasFullyQualifiedNameString(id.FullyQualifiedName()), resourceshowoutputassert.FunctionShowOutput(t, functionModel.ResourceReference()). HasIsSecure(false), @@ -183,7 +183,7 @@ func TestAcc_FunctionJavascript_InlineFull(t *testing.T) { HasCommentString("some other comment"). HasFunctionLanguageString("JAVASCRIPT"). HasNullInputBehaviorString(string(sdk.NullInputBehaviorReturnsNullInput)). - HasReturnBehaviorString(string(sdk.ReturnResultsBehaviorVolatile)). + HasReturnResultsBehaviorString(string(sdk.ReturnResultsBehaviorVolatile)). HasFullyQualifiedNameString(id.FullyQualifiedName()), resourceshowoutputassert.FunctionShowOutput(t, functionModelUpdateWithoutRecreation.ResourceReference()). HasIsSecure(false), diff --git a/pkg/resources/function_sql_acceptance_test.go b/pkg/resources/function_sql_acceptance_test.go index c8df1348ed..fb998e3265 100644 --- a/pkg/resources/function_sql_acceptance_test.go +++ b/pkg/resources/function_sql_acceptance_test.go @@ -124,7 +124,7 @@ func TestAcc_FunctionSql_InlineFull(t *testing.T) { HasNameString(id.Name()). HasIsSecureString(r.BooleanFalse). HasCommentString(comment). - HasReturnBehaviorString(string(sdk.ReturnResultsBehaviorVolatile)). + HasReturnResultsBehaviorString(string(sdk.ReturnResultsBehaviorVolatile)). HasFunctionDefinitionString(definition). HasFunctionLanguageString("SQL"). HasFullyQualifiedNameString(id.FullyQualifiedName()), diff --git a/pkg/resources/primary_connection_acceptance_test.go b/pkg/resources/primary_connection_acceptance_test.go index 8c2241a328..155d5e6139 100644 --- a/pkg/resources/primary_connection_acceptance_test.go +++ b/pkg/resources/primary_connection_acceptance_test.go @@ -69,7 +69,7 @@ func TestAcc_PrimaryConnection_Basic(t *testing.T) { HasComment(""). HasIsPrimary(true). HasPrimaryIdentifier(primaryConnectionAsExternalId). - HasFailoverAllowedToAccounts(accountId). + HasFailoverAllowedToAccountsList(accountId). HasConnectionUrl( acc.TestClient().Connection.GetConnectionUrl(accountId.OrganizationName(), id.Name()), ), @@ -127,7 +127,7 @@ func TestAcc_PrimaryConnection_Basic(t *testing.T) { HasCommentString(""), resourceshowoutputassert.ConnectionShowOutput(t, connectionModelWithFailover.ResourceReference()). - HasFailoverAllowedToAccounts(accountId, secondaryAccountId), + HasFailoverAllowedToAccountsList(accountId, secondaryAccountId), ), ), }, @@ -143,7 +143,7 @@ func TestAcc_PrimaryConnection_Basic(t *testing.T) { HasCommentString(""), resourceshowoutputassert.ConnectionShowOutput(t, connectionModel.ResourceReference()). - HasFailoverAllowedToAccounts(accountId), + HasFailoverAllowedToAccountsList(accountId), ), ), }, @@ -194,7 +194,7 @@ func TestAcc_PrimaryConnection_ExternalChanges(t *testing.T) { HasComment("config comment"). HasIsPrimary(true). HasPrimaryIdentifier(primaryConnectionAsExternalId). - HasFailoverAllowedToAccounts(accountId), + HasFailoverAllowedToAccountsList(accountId), ), ), }, @@ -247,7 +247,7 @@ func TestAcc_PrimaryConnection_ExternalChanges(t *testing.T) { resourceassert.PrimaryConnectionResource(t, connectionModel.ResourceReference()). HasNoEnableFailoverToAccounts(), resourceshowoutputassert.ConnectionShowOutput(t, connectionModel.ResourceReference()). - HasFailoverAllowedToAccounts(accountId), + HasFailoverAllowedToAccountsList(accountId), ), ), }, @@ -274,7 +274,7 @@ func TestAcc_PrimaryConnection_ExternalChanges(t *testing.T) { resourceassert.PrimaryConnectionResource(t, connectionModelWithFailover.ResourceReference()). HasExactlyFailoverToAccountsInOrder(secondaryAccountId), resourceshowoutputassert.ConnectionShowOutput(t, connectionModelWithFailover.ResourceReference()). - HasFailoverAllowedToAccounts(accountId, secondaryAccountId), + HasFailoverAllowedToAccountsList(accountId, secondaryAccountId), ), ), }, diff --git a/pkg/resources/secondary_connection_acceptance_test.go b/pkg/resources/secondary_connection_acceptance_test.go index 380f3b49b5..aab7634b9d 100644 --- a/pkg/resources/secondary_connection_acceptance_test.go +++ b/pkg/resources/secondary_connection_acceptance_test.go @@ -67,7 +67,7 @@ func TestAcc_SecondaryConnection_Basic(t *testing.T) { HasComment(""). HasIsPrimary(false). HasPrimaryIdentifier(primaryConnectionAsExternalId). - HasFailoverAllowedToAccounts(accountId). + HasFailoverAllowedToAccountsList(accountId). HasConnectionUrl( acc.SecondaryTestClient().Connection.GetConnectionUrl(accountId.OrganizationName(), id.Name()), ), diff --git a/pkg/resources/stream_on_directory_table_acceptance_test.go b/pkg/resources/stream_on_directory_table_acceptance_test.go index 0f61963f93..a77c1f47b7 100644 --- a/pkg/resources/stream_on_directory_table_acceptance_test.go +++ b/pkg/resources/stream_on_directory_table_acceptance_test.go @@ -71,7 +71,7 @@ func TestAcc_StreamOnDirectoryTable_Basic(t *testing.T) { HasSourceType(sdk.StreamSourceTypeStage). HasBaseTablesPartiallyQualified(stage.ID().Name()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeDefault). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -126,7 +126,7 @@ func TestAcc_StreamOnDirectoryTable_Basic(t *testing.T) { HasSourceType(sdk.StreamSourceTypeStage). HasBaseTablesPartiallyQualified(stage.ID().Name()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeDefault). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -176,7 +176,7 @@ func TestAcc_StreamOnDirectoryTable_Basic(t *testing.T) { HasSourceType(sdk.StreamSourceTypeStage). HasBaseTablesPartiallyQualified(stage.ID().Name()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeDefault). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -223,7 +223,7 @@ func TestAcc_StreamOnDirectoryTable_Basic(t *testing.T) { HasSourceType(sdk.StreamSourceTypeStage). HasBaseTablesPartiallyQualified(stage.ID().Name()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeDefault). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). diff --git a/pkg/resources/stream_on_external_table_acceptance_test.go b/pkg/resources/stream_on_external_table_acceptance_test.go index f3d9feb28f..4d626dd821 100644 --- a/pkg/resources/stream_on_external_table_acceptance_test.go +++ b/pkg/resources/stream_on_external_table_acceptance_test.go @@ -93,9 +93,9 @@ func TestAcc_StreamOnExternalTable_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(externalTable.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeExternalTable). - HasBaseTables(externalTable.ID()). + HasBaseTablesList(externalTable.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeInsertOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -155,9 +155,9 @@ func TestAcc_StreamOnExternalTable_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(externalTable.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeExternalTable). - HasBaseTables(externalTable.ID()). + HasBaseTablesList(externalTable.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeInsertOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -207,9 +207,9 @@ func TestAcc_StreamOnExternalTable_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(externalTable.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeExternalTable). - HasBaseTables(externalTable.ID()). + HasBaseTablesList(externalTable.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeInsertOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -256,9 +256,9 @@ func TestAcc_StreamOnExternalTable_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(externalTable.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeExternalTable). - HasBaseTables(externalTable.ID()). + HasBaseTablesList(externalTable.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeInsertOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -305,9 +305,9 @@ func TestAcc_StreamOnExternalTable_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(externalTable.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeExternalTable). - HasBaseTables(externalTable.ID()). + HasBaseTablesList(externalTable.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeInsertOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -709,9 +709,9 @@ func TestAcc_StreamOnExternalTable_At(t *testing.T) { HasComment("foo"). HasTableName(externalTable.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeExternalTable). - HasBaseTables(externalTable.ID()). + HasBaseTablesList(externalTable.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeInsertOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -801,9 +801,9 @@ func TestAcc_StreamOnExternalTable_Before(t *testing.T) { HasComment("foo"). HasTableName(externalTable.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeExternalTable). - HasBaseTables(externalTable.ID()). + HasBaseTablesList(externalTable.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeInsertOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). diff --git a/pkg/resources/stream_on_table_acceptance_test.go b/pkg/resources/stream_on_table_acceptance_test.go index bc71c43560..49611b96a7 100644 --- a/pkg/resources/stream_on_table_acceptance_test.go +++ b/pkg/resources/stream_on_table_acceptance_test.go @@ -83,9 +83,9 @@ func TestAcc_StreamOnTable_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(table.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeTable). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeDefault). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -141,9 +141,9 @@ func TestAcc_StreamOnTable_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(table.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeTable). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -193,9 +193,9 @@ func TestAcc_StreamOnTable_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(table.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeTable). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -242,9 +242,9 @@ func TestAcc_StreamOnTable_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(table.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeTable). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeDefault). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -620,9 +620,9 @@ func TestAcc_StreamOnTable_At(t *testing.T) { HasComment("foo"). HasTableName(table.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeTable). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -737,9 +737,9 @@ func TestAcc_StreamOnTable_Before(t *testing.T) { HasComment("foo"). HasTableName(table.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeTable). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). diff --git a/pkg/resources/stream_on_view_acceptance_test.go b/pkg/resources/stream_on_view_acceptance_test.go index 279fdb1371..4fc58a79e7 100644 --- a/pkg/resources/stream_on_view_acceptance_test.go +++ b/pkg/resources/stream_on_view_acceptance_test.go @@ -88,9 +88,9 @@ func TestAcc_StreamOnView_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(view.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeView). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeDefault). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -146,9 +146,9 @@ func TestAcc_StreamOnView_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(view.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeView). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -198,9 +198,9 @@ func TestAcc_StreamOnView_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(view.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeView). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -247,9 +247,9 @@ func TestAcc_StreamOnView_Basic(t *testing.T) { HasOwner(snowflakeroles.Accountadmin.Name()). HasTableName(view.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeView). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeDefault). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -643,9 +643,9 @@ func TestAcc_StreamOnView_At(t *testing.T) { HasComment("foo"). HasTableName(view.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeView). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). @@ -763,9 +763,9 @@ func TestAcc_StreamOnView_Before(t *testing.T) { HasComment("foo"). HasTableName(view.ID().FullyQualifiedName()). HasSourceType(sdk.StreamSourceTypeView). - HasBaseTables(table.ID()). + HasBaseTablesList(table.ID()). HasType("DELTA"). - HasStale("false"). + HasStale(false). HasMode(sdk.StreamModeAppendOnly). HasStaleAfterNotEmpty(). HasInvalidReason("N/A"). diff --git a/pkg/resources/task_acceptance_test.go b/pkg/resources/task_acceptance_test.go index b2c50e76d6..ede26f942f 100644 --- a/pkg/resources/task_acceptance_test.go +++ b/pkg/resources/task_acceptance_test.go @@ -76,8 +76,8 @@ func TestAcc_Task_Basic(t *testing.T) { HasOwner(currentRole.Name()). HasComment(""). HasWarehouse(sdk.NewAccountObjectIdentifier("")). - HasNoSchedule(). - HasPredecessors(). + HasScheduleEmpty(). + HasPredecessorsList(). HasState(sdk.TaskStateSuspended). HasDefinition(statement). HasCondition(""). @@ -88,7 +88,7 @@ func TestAcc_Task_Basic(t *testing.T) { HasOwnerRoleType("ROLE"). HasConfig(""). HasBudget(""). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), resourceparametersassert.TaskResourceParameters(t, configModel.ResourceReference()). HasAllDefaults(), ), @@ -180,7 +180,7 @@ func TestAcc_Task_Complete(t *testing.T) { HasComment(comment). HasWarehouse(acc.TestClient().Ids.WarehouseId()). HasScheduleMinutes(10). - HasPredecessors(). + HasPredecessorsList(). HasState(sdk.TaskStateStarted). HasDefinition(statement). HasCondition(condition). @@ -191,7 +191,7 @@ func TestAcc_Task_Complete(t *testing.T) { HasOwnerRoleType("ROLE"). HasConfig(taskConfig). HasBudget(""). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), resourceparametersassert.TaskResourceParameters(t, configModel.ResourceReference()). HasAllDefaults(), ), @@ -290,8 +290,8 @@ func TestAcc_Task_Updates(t *testing.T) { HasOwner(currentRole.Name()). HasComment(""). HasWarehouse(sdk.NewAccountObjectIdentifier("")). - HasNoSchedule(). - HasPredecessors(). + HasScheduleEmpty(). + HasPredecessorsList(). HasState(sdk.TaskStateSuspended). HasDefinition(statement). HasCondition(""). @@ -302,7 +302,7 @@ func TestAcc_Task_Updates(t *testing.T) { HasOwnerRoleType("ROLE"). HasConfig(""). HasBudget(""). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, // Set @@ -341,7 +341,7 @@ func TestAcc_Task_Updates(t *testing.T) { HasWarehouse(warehouse.ID()). HasComment(comment). HasScheduleMinutes(5). - HasPredecessors(). + HasPredecessorsList(). HasState(sdk.TaskStateStarted). HasDefinition(newStatement). HasCondition(condition). @@ -352,7 +352,7 @@ func TestAcc_Task_Updates(t *testing.T) { HasOwnerRoleType("ROLE"). HasConfig(taskConfig). HasBudget(""). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, // Unset @@ -389,8 +389,8 @@ func TestAcc_Task_Updates(t *testing.T) { HasOwner(currentRole.Name()). HasComment(""). HasWarehouse(sdk.NewAccountObjectIdentifier("")). - HasNoSchedule(). - HasPredecessors(). + HasScheduleEmpty(). + HasPredecessorsList(). HasState(sdk.TaskStateSuspended). HasDefinition(statement). HasCondition(""). @@ -401,7 +401,7 @@ func TestAcc_Task_Updates(t *testing.T) { HasOwnerRoleType("ROLE"). HasConfig(""). HasBudget(""). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, }, @@ -634,7 +634,7 @@ func TestAcc_Task_ExternalChanges(t *testing.T) { HasWarehouse(warehouse.ID()). HasComment(comment). HasScheduleMinutes(5). - HasPredecessors(). + HasPredecessorsList(). HasState(sdk.TaskStateStarted). HasDefinition(statement). HasCondition(condition). @@ -645,7 +645,7 @@ func TestAcc_Task_ExternalChanges(t *testing.T) { HasOwnerRoleType("ROLE"). HasConfig(taskConfig). HasBudget(""). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, // External change - unset all optional fields and expect no change @@ -696,7 +696,7 @@ func TestAcc_Task_ExternalChanges(t *testing.T) { HasWarehouse(warehouse.ID()). HasComment(comment). HasScheduleMinutes(5). - HasPredecessors(). + HasPredecessorsList(). HasState(sdk.TaskStateStarted). HasDefinition(statement). HasCondition(condition). @@ -707,7 +707,7 @@ func TestAcc_Task_ExternalChanges(t *testing.T) { HasOwnerRoleType("ROLE"). HasConfig(taskConfig). HasBudget(""). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, // Unset optional values @@ -739,8 +739,8 @@ func TestAcc_Task_ExternalChanges(t *testing.T) { HasOwner(currentRole.Name()). HasComment(""). HasWarehouse(sdk.NewAccountObjectIdentifier("")). - HasNoSchedule(). - HasPredecessors(). + HasScheduleEmpty(). + HasPredecessorsList(). HasState(sdk.TaskStateSuspended). HasDefinition(statement). HasCondition(""). @@ -751,7 +751,7 @@ func TestAcc_Task_ExternalChanges(t *testing.T) { HasOwnerRoleType("ROLE"). HasConfig(""). HasBudget(""). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, // External change - set all optional fields and expect no change @@ -801,8 +801,8 @@ func TestAcc_Task_ExternalChanges(t *testing.T) { HasOwner(currentRole.Name()). HasComment(""). HasWarehouse(sdk.NewAccountObjectIdentifier("")). - HasNoSchedule(). - HasPredecessors(). + HasScheduleEmpty(). + HasPredecessorsList(). HasState(sdk.TaskStateSuspended). HasDefinition(statement). HasCondition(""). @@ -813,7 +813,7 @@ func TestAcc_Task_ExternalChanges(t *testing.T) { HasOwnerRoleType("ROLE"). HasConfig(""). HasBudget(""). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, }, @@ -918,7 +918,7 @@ func TestAcc_Task_CronAndMinutes(t *testing.T) { HasName(id.Name()). HasDatabaseName(id.DatabaseName()). HasSchemaName(id.SchemaName()). - HasNoSchedule(), + HasScheduleEmpty(), ), }, // Create with cron @@ -994,7 +994,7 @@ func TestAcc_Task_CronAndMinutes(t *testing.T) { HasName(id.Name()). HasDatabaseName(id.DatabaseName()). HasSchemaName(id.SchemaName()). - HasNoSchedule(), + HasScheduleEmpty(), ), }, }, @@ -1034,7 +1034,7 @@ func TestAcc_Task_CronAndMinutes_ExternalChanges(t *testing.T) { HasName(id.Name()). HasDatabaseName(id.DatabaseName()). HasSchemaName(id.SchemaName()). - HasNoSchedule(), + HasScheduleEmpty(), ), }, // External change - set minutes @@ -1054,7 +1054,7 @@ func TestAcc_Task_CronAndMinutes_ExternalChanges(t *testing.T) { HasName(id.Name()). HasDatabaseName(id.DatabaseName()). HasSchemaName(id.SchemaName()). - HasNoSchedule(), + HasScheduleEmpty(), ), }, // External change - set cron @@ -1074,7 +1074,7 @@ func TestAcc_Task_CronAndMinutes_ExternalChanges(t *testing.T) { HasName(id.Name()). HasDatabaseName(id.DatabaseName()). HasSchemaName(id.SchemaName()). - HasNoSchedule(), + HasScheduleEmpty(), ), }, // Set minutes schedule @@ -1628,7 +1628,7 @@ func TestAcc_Task_ConvertStandaloneTaskToSubtask(t *testing.T) { HasAfter(id). HasStartedString(r.BooleanTrue), resourceshowoutputassert.TaskShowOutput(t, childTaskModel.ResourceReference()). - HasPredecessors(id). + HasPredecessorsList(id). HasState(sdk.TaskStateStarted), ), }, @@ -1702,14 +1702,14 @@ func TestAcc_Task_ConvertStandaloneTaskToFinalizer(t *testing.T) { HasSuspendTaskAfterNumFailuresString("1"), resourceshowoutputassert.TaskShowOutput(t, firstTaskStandaloneModel.ResourceReference()). HasScheduleMinutes(schedule). - HasTaskRelations(sdk.TaskRelations{}). + HasTaskRelationsObject(sdk.TaskRelations{}). HasState(sdk.TaskStateStarted), resourceassert.TaskResource(t, secondTaskStandaloneModel.ResourceReference()). HasScheduleMinutes(schedule). HasStartedString(r.BooleanTrue), resourceshowoutputassert.TaskShowOutput(t, secondTaskStandaloneModel.ResourceReference()). HasScheduleMinutes(schedule). - HasTaskRelations(sdk.TaskRelations{}). + HasTaskRelationsObject(sdk.TaskRelations{}). HasState(sdk.TaskStateStarted), ), }, @@ -1725,12 +1725,12 @@ func TestAcc_Task_ConvertStandaloneTaskToFinalizer(t *testing.T) { resourceshowoutputassert.TaskShowOutput(t, rootTaskModel.ResourceReference()). HasScheduleMinutes(schedule). // TODO(SNOW-1843489): Create ticket and report; this field in task relations seems to have mixed chances of appearing (needs deeper digging, doesn't affect the resource; could be removed for now) - // HasTaskRelations(sdk.TaskRelations{FinalizerTask: &finalizerTaskId}). + // HasTaskRelationsObject(sdk.TaskRelations{FinalizerTask: &finalizerTaskId}). HasState(sdk.TaskStateStarted), resourceassert.TaskResource(t, childTaskModel.ResourceReference()). HasStartedString(r.BooleanTrue), resourceshowoutputassert.TaskShowOutput(t, childTaskModel.ResourceReference()). - HasTaskRelations(sdk.TaskRelations{FinalizedRootTask: &rootTaskId}). + HasTaskRelationsObject(sdk.TaskRelations{FinalizedRootTask: &rootTaskId}). HasState(sdk.TaskStateStarted), ), }, @@ -1745,14 +1745,14 @@ func TestAcc_Task_ConvertStandaloneTaskToFinalizer(t *testing.T) { HasSuspendTaskAfterNumFailuresString("10"), resourceshowoutputassert.TaskShowOutput(t, firstTaskStandaloneModelDisabled.ResourceReference()). HasScheduleMinutes(schedule). - HasTaskRelations(sdk.TaskRelations{}). + HasTaskRelationsObject(sdk.TaskRelations{}). HasState(sdk.TaskStateSuspended), resourceassert.TaskResource(t, secondTaskStandaloneModelDisabled.ResourceReference()). HasScheduleMinutes(schedule). HasStartedString(r.BooleanFalse), resourceshowoutputassert.TaskShowOutput(t, secondTaskStandaloneModelDisabled.ResourceReference()). HasScheduleMinutes(schedule). - HasTaskRelations(sdk.TaskRelations{}). + HasTaskRelationsObject(sdk.TaskRelations{}). HasState(sdk.TaskStateSuspended), ), }, @@ -2034,7 +2034,7 @@ func TestAcc_Task_UpdateFinalizerExternally(t *testing.T) { HasFinalizeString(""), resourceshowoutputassert.TaskShowOutput(t, childTaskConfigModelWithoutFinalizer.ResourceReference()). HasState(sdk.TaskStateStarted). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, // Set finalizer in config @@ -2047,7 +2047,7 @@ func TestAcc_Task_UpdateFinalizerExternally(t *testing.T) { HasFinalizeString(rootId.FullyQualifiedName()), resourceshowoutputassert.TaskShowOutput(t, childTaskConfigModelWithFinalizer.ResourceReference()). HasState(sdk.TaskStateStarted). - HasTaskRelations(sdk.TaskRelations{FinalizedRootTask: &rootId}), + HasTaskRelationsObject(sdk.TaskRelations{FinalizedRootTask: &rootId}), ), }, // Unset finalizer externally @@ -2070,7 +2070,7 @@ func TestAcc_Task_UpdateFinalizerExternally(t *testing.T) { HasFinalizeString(rootId.FullyQualifiedName()), resourceshowoutputassert.TaskShowOutput(t, childTaskConfigModelWithFinalizer.ResourceReference()). HasState(sdk.TaskStateStarted). - HasTaskRelations(sdk.TaskRelations{FinalizedRootTask: &rootId}), + HasTaskRelationsObject(sdk.TaskRelations{FinalizedRootTask: &rootId}), ), }, // Unset finalizer in config @@ -2083,7 +2083,7 @@ func TestAcc_Task_UpdateFinalizerExternally(t *testing.T) { HasFinalizeString(""), resourceshowoutputassert.TaskShowOutput(t, childTaskConfigModelWithoutFinalizer.ResourceReference()). HasState(sdk.TaskStateStarted). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, }, @@ -2148,7 +2148,7 @@ func TestAcc_Task_UpdateAfterExternally(t *testing.T) { HasAfter(), resourceshowoutputassert.TaskShowOutput(t, childTaskConfigModelWithoutAfter.ResourceReference()). HasState(sdk.TaskStateStarted). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, // Set after in config @@ -2161,7 +2161,7 @@ func TestAcc_Task_UpdateAfterExternally(t *testing.T) { HasAfter(rootId), resourceshowoutputassert.TaskShowOutput(t, childTaskConfigModelWithAfter.ResourceReference()). HasState(sdk.TaskStateStarted). - HasTaskRelations(sdk.TaskRelations{Predecessors: []sdk.SchemaObjectIdentifier{rootId}}), + HasTaskRelationsObject(sdk.TaskRelations{Predecessors: []sdk.SchemaObjectIdentifier{rootId}}), ), }, // Unset after externally @@ -2184,7 +2184,7 @@ func TestAcc_Task_UpdateAfterExternally(t *testing.T) { HasAfter(rootId), resourceshowoutputassert.TaskShowOutput(t, childTaskConfigModelWithAfter.ResourceReference()). HasState(sdk.TaskStateStarted). - HasTaskRelations(sdk.TaskRelations{Predecessors: []sdk.SchemaObjectIdentifier{rootId}}), + HasTaskRelationsObject(sdk.TaskRelations{Predecessors: []sdk.SchemaObjectIdentifier{rootId}}), ), }, // Unset after in config @@ -2197,7 +2197,7 @@ func TestAcc_Task_UpdateAfterExternally(t *testing.T) { HasAfter(), resourceshowoutputassert.TaskShowOutput(t, childTaskConfigModelWithoutAfter.ResourceReference()). HasState(sdk.TaskStateStarted). - HasTaskRelations(sdk.TaskRelations{}), + HasTaskRelationsObject(sdk.TaskRelations{}), ), }, },