From af93cfd6a53b9afd2be12fcaba9992c49a58b2df Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Fri, 7 Oct 2022 13:05:28 -0700 Subject: [PATCH] fixup bats --- go/libraries/doltcore/env/multi_repo_env.go | 7 ++----- integration-tests/bats/init.bats | 6 ++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/go/libraries/doltcore/env/multi_repo_env.go b/go/libraries/doltcore/env/multi_repo_env.go index e5d652a27f..1eb7d6bec4 100644 --- a/go/libraries/doltcore/env/multi_repo_env.go +++ b/go/libraries/doltcore/env/multi_repo_env.go @@ -273,11 +273,11 @@ func MultiEnvForDirectory( envSet := map[string]*DoltEnv{} if dEnv.Valid() { - mrEnv.AddEnv(dbName, dEnv) + envSet[dbName] = dEnv } // If there are other directories in the directory, try to load them as additional databases - err := fs.Iter(".", false, func(path string, size int64, isDir bool) (stop bool) { + fs.Iter(".", false, func(path string, size int64, isDir bool) (stop bool) { if !isDir { return false } @@ -295,9 +295,6 @@ func MultiEnvForDirectory( } return false }) - if err != nil { - return nil, err - } enforceSingleFormat(envSet) for dbName, dEnv = range envSet { diff --git a/integration-tests/bats/init.bats b/integration-tests/bats/init.bats index 896d6986e3..ffe34ff809 100644 --- a/integration-tests/bats/init.bats +++ b/integration-tests/bats/init.bats @@ -251,10 +251,9 @@ teardown() { } @test "init: create a database when current working directory does not have a database yet" { - # it creates old format even though there is new format db exists in the current directory. set_dolt_user "baz", "baz@bash.com" - # Default format is OLD (__LD_1__) when DOLT_DEFAULT_BIN_FORMAT is undefined + # Default format is NEW (__DOLT__) when DOLT_DEFAULT_BIN_FORMAT is undefined if [ "$DOLT_DEFAULT_BIN_FORMAT" = "" ] then orig_bin_format="__DOLT__" @@ -281,10 +280,9 @@ teardown() { [[ $output =~ "test" ]] || false cd test - dolt version run dolt version [ "$status" -eq 0 ] - [[ "$output" =~ "$orig_bin_format" ]] || false + [[ "$output" =~ "__DOLT__" ]] || false } assert_valid_repository () {