mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-19 02:06:25 -05:00
cleanup
This commit is contained in:
@@ -36,14 +36,14 @@ const (
|
||||
// function should generally be preferred over this method, especially when working
|
||||
// with tests using multiple databases within a MultiRepoEnv.
|
||||
func CreateTestEnv() *env.DoltEnv {
|
||||
return CreateTestEnvWithNameAndNbf("test", types.Format_Default)
|
||||
return CreateTestEnvWithName("test")
|
||||
}
|
||||
|
||||
// CreateTestEnvWithNameAndNbf creates a new DoltEnv suitable for testing and uses
|
||||
// CreateTestEnvWithName creates a new DoltEnv suitable for testing and uses
|
||||
// the specified name to distinguish it from other test envs. This function
|
||||
// should generally be preferred over CreateTestEnv, especially when working with
|
||||
// tests using multiple databases within a MultiRepoEnv.
|
||||
func CreateTestEnvWithNameAndNbf(envName string, nbf *types.NomsBinFormat) *env.DoltEnv {
|
||||
func CreateTestEnvWithName(envName string) *env.DoltEnv {
|
||||
const name = "billy bob"
|
||||
const email = "bigbillieb@fake.horse"
|
||||
initialDirs := []string{TestHomeDirPrefix + envName, WorkingDirPrefix + envName}
|
||||
@@ -55,7 +55,7 @@ func CreateTestEnvWithNameAndNbf(envName string, nbf *types.NomsBinFormat) *env.
|
||||
env.UserNameKey: name,
|
||||
env.UserEmailKey: email,
|
||||
})
|
||||
err := dEnv.InitRepo(context.Background(), nbf, name, email, env.DefaultInitBranch)
|
||||
err := dEnv.InitRepo(context.Background(), types.Format_Default, name, email, env.DefaultInitBranch)
|
||||
|
||||
if err != nil {
|
||||
panic("Failed to initialize environment:" + err.Error())
|
||||
|
||||
@@ -16,19 +16,16 @@ import (
|
||||
"github.com/dolthub/dolt/go/cmd/dolt/commands/engine"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/dtestutils"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/env"
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
)
|
||||
|
||||
const (
|
||||
tableSize = 10_000
|
||||
dbName = "sysbench"
|
||||
)
|
||||
|
||||
var dEnv *env.DoltEnv
|
||||
|
||||
func init() {
|
||||
nbf := types.Format_Default
|
||||
dEnv = dtestutils.CreateTestEnvWithNameAndNbf(dbName, nbf)
|
||||
dEnv = dtestutils.CreateTestEnv()
|
||||
populateRepo(dEnv)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user