Files
wehub-resource-sync 5357c39144
Fuzzer / Run Fuzzer (push) Has been cancelled
Race tests / Go race tests (ubuntu-22.04) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:01:40 +08:00

42 lines
863 B
Bash

#!/usr/bin/env bats
load $BATS_TEST_DIRNAME/helper/common.bash
load $BATS_TEST_DIRNAME/helper/query-server-common.bash
setup() {
setup_common
TMPDIRS=$(pwd)/tmpdirs
init_helper $TMPDIRS
cd $TMPDIRS
}
init_helper() {
TMPDIRS=$1
mkdir -p "${TMPDIRS}/dbs1"
for i in {1..2}; do
mkdir "${TMPDIRS}/dbs1/repo${i}"
cd "${TMPDIRS}/dbs1/repo${i}"
dolt init
done
}
teardown() {
stop_sql_server 1
teardown_common
rm -rf $TMPDIRS
cd $BATS_TMPDIR
}
@test "multidb: database default branches" {
cd dbs1
start_multi_db_server repo1
dolt sql -q "create database new;
use new;
call dolt_checkout('-b', 'feat');
create table t (x int);
call dolt_add('.');
call dolt_commit('-am', 'cm');
set @@global.new_default_branch='feat'"
dolt sql -q "use repo1"
}