Repository: dolthub/dolt
File: go/libraries/doltcore/sqle/enginetest/dolt_queries_rebase.go (Go)

Code before:
				Query:          "call dolt_rebase('-i', 'main');",
				ExpectedErrStr: "unable to start rebase while a merge is in progress – abort the current merge before proceeding",
			},
		},
	},
	{
		Name: "dolt_rebase: non-interactive rebase successful",
		SetUpScript: []string{
			"create table t (pk int primary key);",
			"call dolt_commit('-Am', 'creating table t on main');",
			"call dolt_branch('feature');",
			"call dolt_checkout('feature');",
			"insert into t values (1);",
			"call dolt_commit('-am', 'feature commit 1');",
			"insert into t values (2);",
			"call dolt_commit('-am', 'feature commit 2');",
		},
		Assertions: []queries.ScriptTestAssertion{
			{
				Query:    "call dolt_rebase('main');",
				Expected: []sql.Row{{0, "Successfully rebased and updated refs/heads/feature"}},
			},
		},
	},
	{
		Name: "dolt_rebase: interactive mode requires continue",
		SetUpScript: []string{
			"create table t (pk int primary key);",
			"call dolt_commit('-Am', 'creating table t on main');",
			"call dolt_branch('feature2');",
			"call dolt_checkout('feature2');",
			"insert into t values (1);",
			"call dolt_commit('-am', 'feature2 commit 1');",
		},
		Assertions: []queries.ScriptTestAssertion{
			{
				Query:    "call dolt_rebase('--interactive', 'main');",
				Expected: []sql.Row{{0, "interactive rebase started on branch dolt_rebase_feature2; adjust the rebase plan in the dolt_rebase table, then continue rebasing by calling dolt_rebase('--continue')"}},
			},
			{
				Query:    "call dolt_rebase('--continue');",
				Expected: []sql.Row{{0, "Successfully rebased and updated refs/heads/feature2"}},
			},
		},
	},
	{
		Name: "dolt_rebase errors: rebase working branch already exists",
		SetUpScript: []string{
			"create table t (pk int primary key);",
			"call dolt_commit('-Am', 'creating table t');",
			"call dolt_branch('branch1');",

Review comment (suggestion):
I'm not sure this test is needed – seems like we have enough other tests in `dolt_queries_rebase.go` that use `--continue`. 

Code after:
				Query:          "call dolt_rebase('-i', 'main');",
				ExpectedErrStr: "unable to start rebase while a merge is in progress – abort the current merge before proceeding",
			},
		},
	},
	{
		Name: "dolt_rebase: non-interactive rebase successful",
		SetUpScript: []string{
			"create table t (pk int primary key);",
			"call dolt_commit('-Am', 'creating table t on main');",
			"insert into t values (42);",
			"call dolt_commit('-am', 'main commit with pk = 42');",
			"call dolt_branch('feature', 'HEAD~1');",
			"call dolt_checkout('feature');",
			"insert into t values (1);",
			"call dolt_commit('-am', 'feature commit 1');",
			"insert into t values (2);",
			"call dolt_commit('-am', 'feature commit 2');",
		},
		Assertions: []queries.ScriptTestAssertion{
			{
				Query:    "call dolt_rebase('main');",
				Expected: []sql.Row{{0, "Successfully rebased and updated refs/heads/feature"}},
			},
			{
				Query: "select pk from t where pk = 42;",
				Expected: []sql.Row{
					{42},
				},
			},
		},
	},
	{
		Name: "dolt_rebase errors: rebase working branch already exists",
		SetUpScript: []string{
			"create table t (pk int primary key);",
			"call dolt_commit('-Am', 'creating table t');",
			"call dolt_branch('branch1');",
			"call dolt_branch('dolt_rebase_branch1');",

			"insert into t values (0);",
			"call dolt_commit('-am', 'inserting row 0');",

			"call dolt_checkout('branch1');",
			"insert into t values (1);",
			"call dolt_commit('-am', 'inserting row 1');",
			"insert into t values (10);",
			"call dolt_commit('-am', 'inserting row 10');",
		},
		Assertions: []queries.ScriptTestAssertion{
			{