Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-asawicki committed Dec 3, 2024
1 parent e66a936 commit 189a6f0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion pkg/sdk/data_types_deprecated.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const (
DataTypeBoolean DataType = "BOOLEAN"
DataTypeDate DataType = "DATE"
DataTypeTime DataType = "TIME"
DataTypeTimestamp DataType = "TIMESTAMP"
DataTypeTimestampLTZ DataType = "TIMESTAMP_LTZ"
DataTypeTimestampNTZ DataType = "TIMESTAMP_NTZ"
DataTypeTimestampTZ DataType = "TIMESTAMP_TZ"
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/testint/external_tables_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestInt_ExternalTables(t *testing.T) {
return []*sdk.ExternalTableColumnRequest{
sdk.NewExternalTableColumnRequest("filename", sdk.DataTypeString, "metadata$filename::string"),
sdk.NewExternalTableColumnRequest("city", sdk.DataTypeString, "value:city:findname::string"),
sdk.NewExternalTableColumnRequest("time", sdk.DataTypeTimestamp, "to_timestamp(value:time::int)"),
sdk.NewExternalTableColumnRequest("time", sdk.DataTypeTimestampLTZ, "to_timestamp_ltz(value:time::int)"),
sdk.NewExternalTableColumnRequest("weather", sdk.DataTypeVariant, "value:weather::variant"),
}
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/sdk/testint/functions_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ func TestInt_FunctionsShowByID(t *testing.T) {
*sdk.NewFunctionArgumentRequest("M", sdk.DataTypeDate),
*sdk.NewFunctionArgumentRequest("N", "DATETIME"),
*sdk.NewFunctionArgumentRequest("O", sdk.DataTypeTime),
*sdk.NewFunctionArgumentRequest("P", sdk.DataTypeTimestamp),
*sdk.NewFunctionArgumentRequest("R", sdk.DataTypeTimestampLTZ),
*sdk.NewFunctionArgumentRequest("S", sdk.DataTypeTimestampNTZ),
*sdk.NewFunctionArgumentRequest("T", sdk.DataTypeTimestampTZ),
Expand All @@ -537,7 +536,7 @@ func TestInt_FunctionsShowByID(t *testing.T) {
"add",
).
WithArguments(args).
WithFunctionDefinition("def add(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, R, S, T, U, V, W, X, Y, Z): A + A"),
WithFunctionDefinition("def add(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, R, S, T, U, V, W, X, Y, Z): A + A"),
)
require.NoError(t, err)

Expand Down
5 changes: 2 additions & 3 deletions pkg/sdk/testint/row_access_policies_gen_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func TestInt_RowAccessPolicies(t *testing.T) {

t.Run("describe row access policy: with timestamp data type normalization", func(t *testing.T) {
argName := random.AlphaN(5)
argType := sdk.DataTypeTimestamp
argType := sdk.DataTypeTimestampLTZ
args := sdk.NewCreateRowAccessPolicyArgsRequest(argName, argType)
body := "true"

Expand All @@ -235,7 +235,7 @@ func TestInt_RowAccessPolicies(t *testing.T) {

assertRowAccessPolicyDescription(t, returnedRowAccessPolicyDescription, rowAccessPolicy.ID(), []sdk.TableColumnSignature{{
Name: argName,
Type: sdk.DataTypeTimestampNTZ,
Type: sdk.DataTypeTimestampLTZ,
}}, body)
})

Expand Down Expand Up @@ -318,7 +318,6 @@ func TestInt_RowAccessPoliciesDescribe(t *testing.T) {
*sdk.NewCreateRowAccessPolicyArgsRequest("M", sdk.DataTypeDate),
*sdk.NewCreateRowAccessPolicyArgsRequest("N", "DATETIME"),
*sdk.NewCreateRowAccessPolicyArgsRequest("O", sdk.DataTypeTime),
*sdk.NewCreateRowAccessPolicyArgsRequest("P", sdk.DataTypeTimestamp),
*sdk.NewCreateRowAccessPolicyArgsRequest("R", sdk.DataTypeTimestampLTZ),
*sdk.NewCreateRowAccessPolicyArgsRequest("S", sdk.DataTypeTimestampNTZ),
*sdk.NewCreateRowAccessPolicyArgsRequest("T", sdk.DataTypeTimestampTZ),
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/testint/warehouses_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ func TestInt_Warehouses(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, 1, result.Running)
assert.Equal(t, 0, result.Queued)
assert.Equal(t, sdk.WarehouseStateSuspended, result.State)
assert.Eventually(t, func() bool { return sdk.WarehouseStateSuspended == result.State }, 5*time.Second, time.Second)
})

t.Run("alter: resize with a long running-query", func(t *testing.T) {
Expand Down

0 comments on commit 189a6f0

Please sign in to comment.