mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-24 10:30:48 -06:00
Fix tests
This commit is contained in:
@@ -2,18 +2,6 @@ import { Database } from "./database.js";
|
||||
import { getConfig } from "./helpers.js";
|
||||
import runWorkbenchTests from "./workbenchTests/index.js";
|
||||
|
||||
// Table
|
||||
|
||||
// Workspaces
|
||||
|
||||
// Diffs
|
||||
|
||||
// Docs
|
||||
|
||||
// Views
|
||||
|
||||
// Tags
|
||||
|
||||
async function workbench() {
|
||||
const database = new Database(getConfig());
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@ export const databaseTests = [
|
||||
{
|
||||
q: `SHOW DATABASES`,
|
||||
res: [
|
||||
{ Database: "information_schema" },
|
||||
{ Database: "mysql" },
|
||||
{ Database: `${dbName}` },
|
||||
{ Database: `${dbName}/main` },
|
||||
{ Database: "information_schema" },
|
||||
{ Database: "mysql" },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -39,10 +39,10 @@ export const databaseTests = [
|
||||
{
|
||||
q: `SHOW DATABASES`,
|
||||
res: [
|
||||
{ Database: "information_schema" },
|
||||
{ Database: "mysql" },
|
||||
{ Database: `${dbName}` },
|
||||
{ Database: `${dbName}/main` },
|
||||
{ Database: "information_schema" },
|
||||
{ Database: "mysql" },
|
||||
{ Database: "new_db" },
|
||||
],
|
||||
},
|
||||
|
||||
@@ -14,6 +14,12 @@ export default async function runWorkbenchTests(database) {
|
||||
await runTests(database, logTests);
|
||||
await runTests(database, mergeTests);
|
||||
await runTests(database, tableTests);
|
||||
// TODO:
|
||||
// Workspaces
|
||||
// Diffs
|
||||
// Docs
|
||||
// Views
|
||||
// Tags
|
||||
}
|
||||
|
||||
async function runTests(database, tests) {
|
||||
@@ -35,8 +41,6 @@ async function runTests(database, tests) {
|
||||
throw new Error("Query failed");
|
||||
} else {
|
||||
console.log("Query succeeded:", test.q);
|
||||
// console.log("RES", resultStr);
|
||||
// console.log("EXP", expected);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user