From 54cf7bde1a96351ac8d550fd9e29a23ccfe243fc Mon Sep 17 00:00:00 2001 From: Taylor Bantle Date: Wed, 8 Feb 2023 10:03:17 -0800 Subject: [PATCH] Fix tests, add CODEOWNERS --- CODEOWNERS | 23 +++++++++++++++++++ .../node/workbenchTests/databases.js | 12 +++++----- .../node/workbenchTests/table.js | 16 ++++++------- 3 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000000..5361be842c --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,23 @@ +# Lines starting with '#' are comments. + +# Each line is a file pattern followed by one or more owners. + +# These owners will be the default owners for everything in the repo. + +# * @defunkt + +# Order is important. The last matching pattern has the most precedence. + +# So if a pull request only touches javascript files, only these owners + +# will be requested to review. + +# *.js @octocat @github/js + +# You can also use email addresses if you prefer. + +# docs/* docs@example.com + +# Begin dolt repository owners + +integration-tests/mysql-client-tests/node/* @tbantle22 diff --git a/integration-tests/mysql-client-tests/node/workbenchTests/databases.js b/integration-tests/mysql-client-tests/node/workbenchTests/databases.js index 6fd29a2934..0a50aa1844 100644 --- a/integration-tests/mysql-client-tests/node/workbenchTests/databases.js +++ b/integration-tests/mysql-client-tests/node/workbenchTests/databases.js @@ -1,11 +1,11 @@ import { getArgs } from "../helpers.js"; -const args = getArgs(); +const { dbName } = getArgs(); export const databaseTests = [ { q: `USE ::dbName`, - p: { dbName: `${args.dbName}/main` }, + p: { dbName: `${dbName}/main` }, res: { fieldCount: 0, affectedRows: 0, @@ -20,8 +20,8 @@ export const databaseTests = [ res: [ { Database: "information_schema" }, { Database: "mysql" }, - { Database: "mysql_client" }, - { Database: "mysql_client/main" }, + { Database: `${dbName}` }, + { Database: `${dbName}/main` }, ], }, { @@ -41,8 +41,8 @@ export const databaseTests = [ res: [ { Database: "information_schema" }, { Database: "mysql" }, - { Database: "mysql_client" }, - { Database: "mysql_client/main" }, + { Database: `${dbName}` }, + { Database: `${dbName}/main` }, { Database: "new_db" }, ], }, diff --git a/integration-tests/mysql-client-tests/node/workbenchTests/table.js b/integration-tests/mysql-client-tests/node/workbenchTests/table.js index 54c2f92279..d677dd15fe 100644 --- a/integration-tests/mysql-client-tests/node/workbenchTests/table.js +++ b/integration-tests/mysql-client-tests/node/workbenchTests/table.js @@ -1,6 +1,6 @@ import { getArgs } from "../helpers.js"; -const args = getArgs(); +const { dbName } = getArgs(); export const tableTests = [ { @@ -74,7 +74,7 @@ export const tableTests = [ FROM information_schema.statistics WHERE table_schema=:tableSchema AND table_name=:tableName AND index_name!="PRIMARY" GROUP BY index_name;`, - p: { tableSchema: `${args.dbName}/main`, tableName: "test" }, + p: { tableSchema: `${dbName}/main`, tableName: "test" }, res: [ { TABLE_NAME: "test", @@ -116,25 +116,25 @@ export const tableTests = [ q: `SHOW FULL TABLES AS OF :refName WHERE table_type = 'BASE TABLE'`, p: { refName: "main" }, res: [ - { "Tables_in_mysql_client/main": "test", Table_type: "BASE TABLE" }, - { "Tables_in_mysql_client/main": "test_info", Table_type: "BASE TABLE" }, + { [`Tables_in_${dbName}/main`]: "test", Table_type: "BASE TABLE" }, + { [`Tables_in_${dbName}/main`]: "test_info", Table_type: "BASE TABLE" }, ], }, { q: `SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE table_name=:tableName AND table_schema=:tableSchema AND referenced_table_schema IS NOT NULL`, - p: { tableName: "test_info", tableSchema: `${args.dbName}/main` }, + p: { tableName: "test_info", tableSchema: `${dbName}/main` }, res: [ { CONSTRAINT_CATALOG: "def", - CONSTRAINT_SCHEMA: "mysql_client/main", + CONSTRAINT_SCHEMA: `${dbName}/main`, CONSTRAINT_NAME: "s7utamh8", TABLE_CATALOG: "def", - TABLE_SCHEMA: "mysql_client/main", + TABLE_SCHEMA: `${dbName}/main`, TABLE_NAME: "test_info", COLUMN_NAME: "test_pk", ORDINAL_POSITION: 1, POSITION_IN_UNIQUE_CONSTRAINT: 1, - REFERENCED_TABLE_SCHEMA: "mysql_client/main", + REFERENCED_TABLE_SCHEMA: `${dbName}/main`, REFERENCED_TABLE_NAME: "test", REFERENCED_COLUMN_NAME: "pk", },