Skip to content

Commit aad3a04

Browse files
Added cleanup to data_federation_db_test.go
1 parent 638c43f commit aad3a04

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/e2e/atlas/data_federation_db_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,21 @@ func TestDataFederation(t *testing.T) {
6565
assert.Equal(t, dataFederationName, dataLake.GetName())
6666
})
6767

68+
t.Cleanup(func() {
69+
t.Log("cleaning up created datafederation")
70+
cmd := exec.Command(cliPath,
71+
datafederationEntity,
72+
"delete",
73+
dataFederationName,
74+
"--force")
75+
cmd.Env = os.Environ()
76+
77+
// this command will only succeed in case one of the tests after this one fails
78+
// not printing the output, because it might cause confusion
79+
_ = cmd.Run()
80+
t.Log("finished cleaning up created datafederation")
81+
})
82+
6883
t.Run("Describe", func(t *testing.T) {
6984
cmd := exec.Command(cliPath,
7085
datafederationEntity,

0 commit comments

Comments
 (0)