mirror of https://github.com/databricks/cli.git
use t.Cleanup instead of defer
This commit is contained in:
parent
80d9b6ae17
commit
42502513bf
|
@ -30,7 +30,9 @@ func TestFetchRepositoryInfoAPI(t *testing.T) {
|
|||
|
||||
targetPath := acc.RandomName("/Workspace/Users/" + me.UserName + "/testing-clone-bundle-examples-")
|
||||
stdout, stderr := RequireSuccessfulRun(t, "repos", "create", examplesRepoUrl, examplesRepoProvider, "--path", targetPath)
|
||||
defer RequireSuccessfulRun(t, "repos", "delete", targetPath)
|
||||
t.Cleanup(func() {
|
||||
RequireSuccessfulRun(t, "repos", "delete", targetPath)
|
||||
})
|
||||
|
||||
assert.Empty(t, stderr.String())
|
||||
assert.NotEmpty(t, stdout.String())
|
||||
|
|
Loading…
Reference in New Issue