mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-23 13:48:42 -05:00
more pull options bats tests
This commit is contained in:
@@ -399,3 +399,24 @@ SQL
|
||||
[[ ! "$output" =~ "add (1,2) to t1" ]] || false
|
||||
[[ ! "$output" =~ "add (2,3) to t1" ]] || false
|
||||
}
|
||||
|
||||
@test "pull: --no-ff and --no-commit" {
|
||||
cd repo2
|
||||
run dolt sql -q "show tables" -r csv
|
||||
[ "$status" -eq 0 ]
|
||||
[ "${#lines[@]}" -eq 1 ]
|
||||
|
||||
run dolt pull --no-ff --no-commit origin
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "Automatic merge went well; stopped before committing as requested" ]] || false
|
||||
|
||||
run dolt sql -q "show tables" -r csv
|
||||
[ "$status" -eq 0 ]
|
||||
[ "${#lines[@]}" -eq 2 ]
|
||||
[[ "$output" =~ "t1" ]] || false
|
||||
|
||||
dolt commit -m "merge from origin"
|
||||
run dolt log
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "merge from origin" ]] || false
|
||||
}
|
||||
|
||||
@@ -446,3 +446,22 @@ SQL
|
||||
[[ ! "$output" =~ "add (1,2) to t1" ]] || false
|
||||
[[ ! "$output" =~ "add (2,3) to t1" ]] || false
|
||||
}
|
||||
|
||||
@test "sql-pull: --no-ff and --no-commit" {
|
||||
cd repo2
|
||||
run dolt sql -q "show tables" -r csv
|
||||
[ "$status" -eq 0 ]
|
||||
[ "${#lines[@]}" -eq 1 ]
|
||||
|
||||
dolt sql -q "call dolt_pull('--no-ff', '--no-commit')"
|
||||
run dolt sql -q "show tables" -r csv
|
||||
[ "$status" -eq 0 ]
|
||||
[ "${#lines[@]}" -eq 2 ]
|
||||
[[ "$output" =~ "t1" ]] || false
|
||||
|
||||
dolt commit -m "merge from origin"
|
||||
run dolt log
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "merge from origin" ]] || false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user