diff --git a/testdata/sqllogictests_bigquery/validation.slt b/testdata/sqllogictests_bigquery/validation.slt index 8dc62acab..e36a3954e 100644 --- a/testdata/sqllogictests_bigquery/validation.slt +++ b/testdata/sqllogictests_bigquery/validation.slt @@ -1,5 +1,25 @@ # Validation tests for big query external database and external tables +# External database validation + +# Validation test with wrong key +statement error +CREATE EXTERNAL DATABASE wrong_key + FROM bigquery OPTIONS ( + service_account_key = '{"random": "key"}', + project_id = '${GCP_PROJECT_ID}', + ); + +# Validation test with non-existent project +statement error +CREATE EXTERNAL DATABASE non_existant_project + FROM bigquery OPTIONS ( + service_account_key = '${GCP_SERVICE_ACCOUNT_KEY}', + project_id = '${GCP_PROJECT_ID}-bad-project', + ); + +# External table validation + # Validation test with empty key statement error CREATE EXTERNAL TABLE empty_key diff --git a/testdata/sqllogictests_mysql/validation.slt b/testdata/sqllogictests_mysql/validation.slt index ce37c36b0..21fa11b54 100644 --- a/testdata/sqllogictests_mysql/validation.slt +++ b/testdata/sqllogictests_mysql/validation.slt @@ -1,5 +1,32 @@ # Validation tests for mysql external database and external tables +# External database validation + +# Validation test error with the wrong password +statement error +CREATE EXTERNAL DATABASE wrong_password + FROM mysql + OPTIONS ( + connection_string = 'mysql://root:wrong_password@127.0.0.1:3307/glaredb_test', + ); + +statement error +CREATE EXTERNAL DATABASE non_existant_user + FROM mysql + OPTIONS ( + connection_string = 'mysql://missing@127.0.0.1:3307/glaredb_test', + ); + +# Validation test error with the wrong host +statement error +CREATE EXTERNAL DATABASE wrong_host + FROM mysql + OPTIONS ( + connection_string = 'mysql://root@non-existant:3307/glaredb_test', + ); + +# External table validation + # Validation test error with the wrong password statement error CREATE EXTERNAL TABLE wrong_password diff --git a/testdata/sqllogictests_postgres/validation.slt b/testdata/sqllogictests_postgres/validation.slt index 405e831fd..a9e24f532 100644 --- a/testdata/sqllogictests_postgres/validation.slt +++ b/testdata/sqllogictests_postgres/validation.slt @@ -1,5 +1,32 @@ # Validation tests for postgres external database and external tables +# External database validation + +# Validation test error with the wrong password +statement error +CREATE EXTERNAL DATABASE wrong_password + FROM postgres + OPTIONS ( + connection_string = 'host=localhost port=5432 user=glaredb password=wrong-password dbname=glaredb_test sslmode=disable', + ); + +statement error +CREATE EXTERNAL DATABASE non_existant_user + FROM postgres + OPTIONS ( + connection_string = 'host=localhost port=5432 user=missing password=password dbname=glaredb_test sslmode=disable', + ); + +# Validation test error with the wrong host +statement error +CREATE EXTERNAL DATABASE wrong_host + FROM postgres + OPTIONS ( + connection_string = 'host=non-existant port=5432 user=glaredb password=password dbname=glaredb_test sslmode=disable', + ); + +# External table validation + # Validation test error with the wrong password statement error CREATE EXTERNAL TABLE wrong_password @@ -39,7 +66,7 @@ CREATE EXTERNAL TABLE missing_table table = 'missing_table' ); -# Validation test error with the wrong table name +# Validation test error with the wrong schema name statement error CREATE EXTERNAL TABLE missing_schema FROM postgres