-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix several small issues (#2697)
Fixed a few issues (from GH and reported internally): - Do not swallow error in access token setup (References: #2678) - Fix import example after v0.85.0 changes (References: #993) - Fix alter allowed values for tags (reported internally) - Suppress diff for quoted on_table/on_view in stream resource (References: #2672) - Test primary key creation (References: #2674 #2629) - Fix v0.85.0 state migrator for external functions (References: #2694)
- Loading branch information
1 parent
23a3341
commit e3f6a15
Showing
20 changed files
with
467 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# format is database name | schema name | external function name | <list of function arg types, separated with '-'> | ||
terraform import snowflake_external_function.example 'dbName|schemaName|externalFunctionName|varchar-varchar-varchar' | ||
# format is <database_name>.<schema_name>.<external_function_name>(<arg types, separated with ','>) | ||
terraform import snowflake_external_function.example 'dbName.schemaName.externalFunctionName(varchar, varchar, varchar)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# format is database name | schema name | function name | <list of arg types, separated with '-'> | ||
terraform import snowflake_function.example 'dbName|schemaName|functionName|varchar-varchar-varchar' | ||
# format is <database_name>.<schema_name>.<function_name>(<arg types, separated with ','>) | ||
terraform import snowflake_function.example 'dbName.schemaName.functionName(varchar, varchar, varchar)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# format is database name | schema name | stored procedure name | <list of arg types, separated with '-'> | ||
terraform import snowflake_procedure.example 'dbName|schemaName|procedureName|varchar-varchar-varchar' | ||
# format is <database_name>.<schema_name>.<procedure_name>(<arg types, separated with ','>) | ||
terraform import snowflake_procedure.example 'dbName.schemaName.procedureName(varchar, varchar, varchar)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package resources | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func Test_suppressIdentifierQuoting(t *testing.T) { | ||
firstId := "a.b.c" | ||
firstIdQuoted := "\"a\".b.\"c\"" | ||
secondId := "d.e.f" | ||
incorrectId := "a.b.c.d.e.f" | ||
|
||
t.Run("old identifier with too many parts", func(t *testing.T) { | ||
result := suppressIdentifierQuoting("", incorrectId, firstId, nil) | ||
require.False(t, result) | ||
}) | ||
|
||
t.Run("new identifier with too many parts", func(t *testing.T) { | ||
result := suppressIdentifierQuoting("", firstId, incorrectId, nil) | ||
require.False(t, result) | ||
}) | ||
|
||
t.Run("old identifier empty", func(t *testing.T) { | ||
result := suppressIdentifierQuoting("", "", firstId, nil) | ||
require.False(t, result) | ||
}) | ||
|
||
t.Run("new identifier empty", func(t *testing.T) { | ||
result := suppressIdentifierQuoting("", firstId, "", nil) | ||
require.False(t, result) | ||
}) | ||
|
||
t.Run("identifiers the same", func(t *testing.T) { | ||
result := suppressIdentifierQuoting("", firstId, firstId, nil) | ||
require.True(t, result) | ||
}) | ||
|
||
t.Run("identifiers the same (but different quoting)", func(t *testing.T) { | ||
result := suppressIdentifierQuoting("", firstId, firstIdQuoted, nil) | ||
require.True(t, result) | ||
}) | ||
|
||
t.Run("identifiers different", func(t *testing.T) { | ||
result := suppressIdentifierQuoting("", firstId, secondId, nil) | ||
require.False(t, result) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.