Skip to content

Commit

Permalink
passing attach url as env parameter to test files
Browse files Browse the repository at this point in the history
  • Loading branch information
hafenkran committed Jul 7, 2024
1 parent df4be53 commit b7a552c
Show file tree
Hide file tree
Showing 22 changed files with 66 additions and 24 deletions.
6 changes: 4 additions & 2 deletions test/sql/storage/attach_alter_table.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery);
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.alter_table;
Expand All @@ -16,4 +18,4 @@ CREATE TABLE test.dataset1.alter_table(i INTEGER);
statement error
ALTER TABLE test.dataset1.alter_table ADD COLUMN j INTEGER;
----
BigQuery does not support altering (coming soon).
BigQuery extension does not support altering.
4 changes: 3 additions & 1 deletion test/sql/storage/attach_catalog.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery);
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

# Handling schemas
# statement ok
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_clear_cache.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.cache_test;
Expand Down
5 changes: 3 additions & 2 deletions test/sql/storage/attach_constraints.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

require bigquery

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

###################
# PRIMARY KEY constraint
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_database_size.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement error
PRAGMA database_size
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_dataset.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP SCHEMA IF EXISTS test.some_test_schema CASCADE
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_default.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
CREATE TABLE test.dataset1.defaults_table (i INTEGER DEFAULT 5, s STRING DEFAULT 'some_default');
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_delete.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.test_delete;
Expand Down
3 changes: 2 additions & 1 deletion test/sql/storage/attach_describe.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
PRAGMA enable_verification

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050' AS test (TYPE bigquery);
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.describe_table;
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_insert_table.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.test_insert;
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_limit.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.table_limit
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_read_only.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery, READ_ONLY)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement error
CREATE TABLE test.dataset1.read_only(i INTEGER);
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_types_arrays.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery);
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.table_arrays;
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_types_blob.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery);
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.table_blob;
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_types_numerics.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery);
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);


foreach type TINYINT SMALLINT INTEGER BIGINT HUGEINT UTINYINT USMALLINT UINTEGER UBIGINT FLOAT DOUBLE
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_types_timestamptz.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery);
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.table_timestamp_with_tz;
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_types_ts.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery);
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.ts_table;
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_types_unsupported.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery);
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.table_arrays;
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_types_varchar.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery);
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.varchars;
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_update_table.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.test_update;
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_update_table2.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP TABLE IF EXISTS test.dataset1.test_update;
Expand Down
4 changes: 3 additions & 1 deletion test/sql/storage/attach_views.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

require bigquery

require-env BQ_ATTACH_DB_URL

statement ok
ATTACH 'project=test api_endpoint=http://127.0.0.0:9050 grpc_endpoint=127.0.0.0:9060' AS test (TYPE bigquery)
ATTACH 'project=test api_endpoint=http://${BQ_ATTACH_DB_URL}:9050 grpc_endpoint=${BQ_ATTACH_DB_URL}:9060' AS test (TYPE bigquery);

statement ok
DROP VIEW IF EXISTS test.dataset1.view_test;
Expand Down

0 comments on commit b7a552c

Please sign in to comment.