Skip to content

Commit

Permalink
chore: fix parameters datasource acceptance test (#1749)
Browse files Browse the repository at this point in the history
* chore: update parameters datasource acceptance test to not rely on nullable value.

* Test USER_TASK_TIMEOUT_MS parameter.
  • Loading branch information
sfc-gh-ngaberel authored Apr 24, 2023
1 parent 929801b commit 338a19d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/datasources/parameters_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestAcc_ParametersOnObject(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet("data.snowflake_parameters.p", "parameters.#"),
resource.TestCheckResourceAttrSet("data.snowflake_parameters.p", "parameters.0.key"),
resource.TestCheckResourceAttrSet("data.snowflake_parameters.p", "parameters.0.value"),
resource.TestCheckResourceAttrSet("data.snowflake_parameters.p", "parameters.0.type"),
resource.TestCheckResourceAttr("data.snowflake_parameters.p", "object_type", "DATABASE"),
resource.TestCheckResourceAttr("data.snowflake_parameters.p", "object_name", dbName),
),
Expand Down
6 changes: 3 additions & 3 deletions pkg/resources/object_parameter_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ func TestAcc_ObjectParameter(t *testing.T) {
CheckDestroy: nil,
Steps: []resource.TestStep{
{
Config: objectParameterConfigBasic(prefix, "ENABLE_STREAM_TASK_REPLICATION", "true"),
Config: objectParameterConfigBasic(prefix, "USER_TASK_TIMEOUT_MS", "1000"),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("snowflake_object_parameter.p", "key", "ENABLE_STREAM_TASK_REPLICATION"),
resource.TestCheckResourceAttr("snowflake_object_parameter.p", "value", "true"),
resource.TestCheckResourceAttr("snowflake_object_parameter.p", "key", "USER_TASK_TIMEOUT_MS"),
resource.TestCheckResourceAttr("snowflake_object_parameter.p", "value", "1000"),
resource.TestCheckResourceAttr("snowflake_object_parameter.p", "on_account", "false"),
),
},
Expand Down

0 comments on commit 338a19d

Please sign in to comment.