mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 03:17:50 +00:00
Merge pull request #1501 from travisturner/disco-bitdepth-test-fix
fix SaveMeta test; ensure storage backend env is used
This commit is contained in:
commit
b790d2cc5f
2 changed files with 6 additions and 2 deletions
|
|
@ -209,7 +209,9 @@ func NewTestField(t *testing.T, opts FieldOption) *TestField {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
h := NewHolder(path, DefaultHolderConfig())
|
||||
cfg := DefaultHolderConfig()
|
||||
cfg.StorageConfig.Backend = CurrentBackendOrDefault()
|
||||
h := NewHolder(path, cfg)
|
||||
panicOn(h.Open())
|
||||
|
||||
idx, err := h.CreateIndex("i", IndexOptions{})
|
||||
|
|
@ -940,6 +942,8 @@ func TestField_SaveMeta(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
} else if !changed {
|
||||
t.Fatal("expected SetValue to return changed = true")
|
||||
} else if err := tx.Commit(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if f.options.BitDepth != expBitDepth {
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ func CurrentBackend() string {
|
|||
}
|
||||
|
||||
// CurrentBackendOrDefault tries the environment variable first, but falls back
|
||||
// to the default backed if the environment variable is empty.
|
||||
// to the default backend if the environment variable is empty.
|
||||
func CurrentBackendOrDefault() string {
|
||||
if backend := os.Getenv("PILOSA_STORAGE_BACKEND"); backend != "" {
|
||||
return backend
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue