diff --git a/test/api/importcsv/api_test.go b/test/api/importcsv/api_test.go index 8e7596fc8..2f7c96752 100644 --- a/test/api/importcsv/api_test.go +++ b/test/api/importcsv/api_test.go @@ -173,6 +173,12 @@ func TestImportCSV(t *testing.T) { // Delete imported Applications. for _, apps := range gotApps { + if apps.Owner != nil { + assert.Must(t, Stakeholder.Delete(apps.Owner.ID)) + } + for _, contributor := range apps.Contributors { + assert.Must(t, Stakeholder.Delete(contributor.ID)) + } assert.Must(t, Application.Delete(apps.ID)) } @@ -180,6 +186,7 @@ func TestImportCSV(t *testing.T) { for _, deps := range gotDeps { assert.Must(t, Dependency.Delete(deps.ID)) } + }) } } diff --git a/test/api/importcsv/pkg.go b/test/api/importcsv/pkg.go index 86dd7663f..6228deef9 100644 --- a/test/api/importcsv/pkg.go +++ b/test/api/importcsv/pkg.go @@ -10,6 +10,7 @@ var ( Client *binding.Client Application binding.Application Dependency binding.Dependency + Stakeholder binding.Stakeholder ) func init() {