Skip to content

Commit

Permalink
Add tests for run action and preview sync action with shared bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVyborny committed Jul 18, 2023
1 parent c64a7d2 commit 3ccbe95
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"columns":["id","col2","col3","col4"],"rows":[[{"columnName":"id","value":"1","isTruncated":false},{"columnName":"col2","value":"a","isTruncated":false},{"columnName":"col3","value":"b","isTruncated":false},{"columnName":"col4","value":"c","isTruncated":false}]]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"action": "preview",
"parameters": {
"tableName": "test",
"bucketId": "in.c-test-bucket",
"models": [
{"code": "SELECT * FROM {{ ref('%model%') }} WHERE \"id\" = 1"}
],
"authorization": {
"host": "%env(string:SNOWFLAKE_HOST)%",
"warehouse": "%env(string:SNOWFLAKE_WAREHOUSE)%",
"database": "%env(string:SNOWFLAKE_DATABASE)%",
"schema": "%env(string:SNOWFLAKE_SCHEMA)%",
"user": "%env(string:SNOWFLAKE_USER)%",
"#password": "%env(string:SNOWFLAKE_PASSWORD)%"
}
}
}
1 change: 1 addition & 0 deletions tests/functional/run-action-shared-bucket/expected-code
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Empty file.
Empty file.
Empty file.
19 changes: 19 additions & 0 deletions tests/functional/run-action-shared-bucket/source/data/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"authorization": {
"workspace": {
"host": "%env(string:SNOWFLAKE_HOST)%",
"warehouse": "%env(string:SNOWFLAKE_WAREHOUSE)%",
"database": "%env(string:SNOWFLAKE_DATABASE)%",
"schema": "%env(string:SNOWFLAKE_SCHEMA)%",
"user": "%env(string:SNOWFLAKE_USER)%",
"password": "%env(string:SNOWFLAKE_PASSWORD)%"
}
},
"parameters": {
"tableName": "test",
"bucketId": "in.c-test-bucket",
"models": [
{"code": "SELECT * FROM {{ ref('%model%') }} WHERE \"id\" = 1"}
]
}
}

0 comments on commit 3ccbe95

Please sign in to comment.