This commit is contained in:
Shreyas Goenka 2025-01-29 15:25:22 +01:00
parent 3e7acdb373
commit ca17487b8e
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 2 additions and 3 deletions

View File

@ -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")