Skip to content

Commit

Permalink
CLOUDP-281931: Add cleanup to datafederation tests (#3357)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenvervaeke authored Oct 31, 2024
1 parent abf767d commit e94e766
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/e2e/atlas/data_federation_db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ func TestDataFederation(t *testing.T) {
assert.Equal(t, dataFederationName, dataLake.GetName())
})

t.Cleanup(func() {
t.Log("cleaning up created datafederation")
cmd := exec.Command(cliPath,
datafederationEntity,
"delete",
dataFederationName,
"--force")
cmd.Env = os.Environ()

// this command will only succeed in case one of the tests after this one fails
// not printing the output, because it might cause confusion
_ = cmd.Run()
t.Log("finished cleaning up created datafederation")
})

t.Run("Describe", func(t *testing.T) {
cmd := exec.Command(cliPath,
datafederationEntity,
Expand Down

0 comments on commit e94e766

Please sign in to comment.