Skip to content

Commit

Permalink
use env variables to pass credentials to test
Browse files Browse the repository at this point in the history
  • Loading branch information
samansmink committed Jun 6, 2024
1 parent 7fd82c6 commit e660027
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions test/sql/uc_catalog.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@
# group: [uc_catalog]

# Require statement will ensure this test is run with this extension loaded
require parquet

require uc_catalog

require delta

require httpfs

# TODO: delta ext can currently not be built in CI so this is disabled by default
mode skip
# Set these to run the test
require-env UC_TOKEN

require-env UC_ENDPOINT

require-env UC_AWS_REGION

# Catalog Secret
statement ok
CREATE SECRET (
TYPE UC,
TOKEN '<redacted>',
ENDPOINT 'https://dbc-0c3d2ced-509c.cloud.databricks.com',
AWS_REGION 'us-east-2'
TOKEN '${UC_TOKEN}',
ENDPOINT '${UC_ENDPOINT}',
AWS_REGION '${UC_AWS_REGION}'
)

# attach the workspace catalog under uc1 alias
Expand All @@ -31,6 +37,8 @@ SHOW ALL TABLES;
----
test_catalog test_schema test_table [a, b] [INTEGER, VARCHAR] false
test_catalog test_schema test_table2 [a, b] [VARCHAR, INTEGER] false
test_catalog test_schema test_table_ramesh [x] [INTEGER] false
test_catalog test_schema test_table_tdas [a, b] [INTEGER, VARCHAR] false

query II
select * from test_catalog.test_schema.test_table;
Expand Down

0 comments on commit e660027

Please sign in to comment.