go/{doltcore/migrate,bats}: update tests with new branch, table names

This commit is contained in:
Andy Arthur
2023-02-22 09:44:13 -08:00
parent cb961d642e
commit b875ffaecf
2 changed files with 8 additions and 8 deletions

View File

@@ -78,7 +78,7 @@ func TestMigration(t *testing.T) {
expected: []sql.Row{{int64(2)}},
},
{
query: "SELECT count(*) FROM `dolt/migrated_commits`.mapping",
query: "SELECT count(*) FROM `dolt/dolt_migrated_commits`.dolt_commit_mapping",
expected: []sql.Row{{int64(2)}},
},
},
@@ -130,15 +130,15 @@ func TestMigration(t *testing.T) {
expected: []sql.Row{{int64(4)}},
},
{
query: "SELECT count(*) FROM `dolt/migrated_commits`.mapping",
query: "SELECT count(*) FROM `dolt/dolt_migrated_commits`.dolt_commit_mapping",
expected: []sql.Row{{int64(4)}},
},
{
query: "SELECT count(*) FROM `dolt/migrated_commits`.mapping WHERE new_commit_hash IN (SELECT commit_hash FROM dolt_log)",
query: "SELECT count(*) FROM `dolt/dolt_migrated_commits`.dolt_commit_mapping WHERE new_commit_hash IN (SELECT commit_hash FROM dolt_log)",
expected: []sql.Row{{int64(4)}},
},
{
query: "SELECT count(*) FROM `dolt/migrated_commits`.mapping WHERE new_commit_hash NOT IN (SELECT commit_hash FROM dolt_log)",
query: "SELECT count(*) FROM `dolt/dolt_migrated_commits`.dolt_commit_mapping WHERE new_commit_hash NOT IN (SELECT commit_hash FROM dolt_log)",
expected: []sql.Row{{int64(0)}},
},
},

View File

@@ -43,8 +43,8 @@ SQL
[ $status -eq 0 ]
[[ "$output" =~ "3" ]] || false
dolt checkout migrated_commits
run dolt sql -q "SELECT count(*) FROM mapping" -r csv
dolt checkout dolt_migrated_commits
run dolt sql -q "SELECT count(*) FROM dolt_commit_mapping" -r csv
[ $status -eq 0 ]
[[ "$output" =~ "2" ]] || false
}
@@ -67,14 +67,14 @@ SQL
pushd db_one
dolt migrate
[[ $(cat ./.dolt/noms/manifest | cut -f 2 -d :) = "$TARGET_NBF" ]] || false
dolt branch -D migrated_commits
dolt branch -D dolt_migrated_commits
ONE=$(dolt branch -av)
popd
pushd db_two
dolt migrate
[[ $(cat ./.dolt/noms/manifest | cut -f 2 -d :) = "$TARGET_NBF" ]] || false
dolt branch -D migrated_commits
dolt branch -D dolt_migrated_commits
TWO=$(dolt branch -av)
popd