70 lines
1.9 KiB
JavaScript
70 lines
1.9 KiB
JavaScript
import { logsMatcher, mergeBaseMatcher, mergeMatcher } from "./matchers.js";
|
|
|
|
export const mergeTests = [
|
|
{
|
|
q: `SELECT DOLT_MERGE_BASE(:fromBranchName, :toBranchName)`,
|
|
p: { fromBranchName: "mybranch", toBranchName: "main" },
|
|
res: [{ "DOLT_MERGE_BASE('mybranch', 'main')": "" }],
|
|
matcher: mergeBaseMatcher,
|
|
},
|
|
{
|
|
q: `SELECT * FROM dolt_status`,
|
|
res: [],
|
|
},
|
|
{
|
|
q: `CALL DOLT_MERGE(?, '--no-ff', '-m', ?)`,
|
|
values: ["mybranch", "Merge mybranch into main"],
|
|
res: [{ hash: "", fast_forward: 0, conflicts: 0, message: "merge successful" }],
|
|
matcher: mergeMatcher,
|
|
},
|
|
{
|
|
q: `SELECT * FROM DOLT_LOG(:refName, '--parents') LIMIT :limit OFFSET :offset`,
|
|
p: { refName: "main", limit: 10, offset: 0 },
|
|
res: [
|
|
{
|
|
commit_hash: "",
|
|
committer: "dolt",
|
|
email: "dolt@%",
|
|
date: "",
|
|
message: "Merge mybranch into main",
|
|
commit_order: 3,
|
|
parents: ["", ""],
|
|
refs: "HEAD -> main",
|
|
signature: null,
|
|
author: "dolt",
|
|
author_email: "dolt@%",
|
|
author_date: "",
|
|
},
|
|
{
|
|
commit_hash: "",
|
|
committer: "Dolt",
|
|
email: "dolt@dolthub.com",
|
|
date: "",
|
|
message: "Create table test",
|
|
commit_order: 2,
|
|
parents: [""],
|
|
refs: "mybranch",
|
|
signature: null,
|
|
author: "Dolt",
|
|
author_email: "dolt@dolthub.com",
|
|
author_date: "",
|
|
},
|
|
{
|
|
commit_hash: "",
|
|
committer: "mysql-test-runner",
|
|
email: "mysql-test-runner@liquidata.co",
|
|
date: "",
|
|
message: "Initialize data repository",
|
|
commit_order: 1,
|
|
parents: [],
|
|
refs: "",
|
|
signature: null,
|
|
author: "mysql-test-runner",
|
|
author_email: "mysql-test-runner@liquidata.co",
|
|
author_date: "",
|
|
},
|
|
],
|
|
matcher: logsMatcher,
|
|
},
|
|
];
|