Commit bb725f9f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9efa027f
...@@ -189,10 +189,6 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption ...@@ -189,10 +189,6 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption
work, err := ioutil.TempDir("", "neo"); X(err) work, err := ioutil.TempDir("", "neo"); X(err)
defer os.RemoveAll(work) defer os.RemoveAll(work)
if opt.Preload != "" {
panic("TODO: preload")
}
f(work) f(work)
} }
...@@ -210,6 +206,16 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption ...@@ -210,6 +206,16 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption
err := npy.Close(); X(err) err := npy.Close(); X(err)
}() }()
if opt.Preload != "" {
cmd := exec.Command("python", "-m", "neo.scripts.neomigrate",
"-s", opt.Preload,
"-d", npy.MasterAddr(), "-c", npy.ClusterName())
cmd.Stdin = nil
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run(); X(err)
}
f(t, npy) f(t, npy)
}) })
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment