mirror of https://github.com/databricks/cli.git
This commit is contained in:
parent
3e7acdb373
commit
ca17487b8e
|
@ -211,6 +211,8 @@ func runTest(t *testing.T, dir, coverDir string, repls testdiff.ReplacementsCont
|
|||
// specifies a custom server stubs.
|
||||
if len(config.Server) > 0 {
|
||||
server := testserver.New(t)
|
||||
t.Cleanup(server.Close)
|
||||
|
||||
for _, stub := range config.Server {
|
||||
require.NotEmpty(t, stub.Pattern)
|
||||
require.NotEmpty(t, stub.Response.Body)
|
||||
|
@ -220,9 +222,6 @@ func runTest(t *testing.T, dir, coverDir string, repls testdiff.ReplacementsCont
|
|||
})
|
||||
}
|
||||
cmdEnv = setEnv(cmdEnv, "DATABRICKS_HOST", server.URL)
|
||||
t.Cleanup(func() {
|
||||
server.Close()
|
||||
})
|
||||
}
|
||||
|
||||
repls.SetPathWithParents(tmpDir, "$TMPDIR")
|
||||
|
|
Loading…
Reference in New Issue