Fix old stale tests junk

This commit is contained in:
Bel LaPointe
2020-07-23 21:13:58 -06:00
parent d572cb5c87
commit d650db5206
7 changed files with 57 additions and 297 deletions

View File

@@ -3,6 +3,7 @@ package storage
import (
"context"
"fmt"
"io/ioutil"
"local/dndex/storage/entity"
"local/dndex/storage/operator"
"os"
@@ -13,12 +14,14 @@ import (
)
func TestIntegration(t *testing.T) {
if len(os.Getenv("INTEGRATION")) == 0 {
t.Logf("skipping because $INTEGRATION unset")
return
}
os.Args = os.Args[:1]
f, err := ioutil.TempFile(os.TempDir(), "pattern*")
if err != nil {
t.Fatal(err)
}
f.Close()
defer os.Remove(f.Name())
os.Setenv("DBURI", f.Name())
graph := NewGraph()
ctx, can := context.WithCancel(context.TODO())
defer can()