func (s *workItemLinkTypeSuite) cleanup() {
	db := s.DB.Unscoped().Delete(&link.WorkItemLinkType{Name: s.linkTypeName})
	require.Nil(s.T(), db.Error)
	db = s.DB.Unscoped().Delete(&link.WorkItemLinkType{Name: s.linkName})
	require.Nil(s.T(), db.Error)
	db = db.Unscoped().Delete(&link.WorkItemLinkCategory{Name: s.categoryName})
	require.Nil(s.T(), db.Error)
	if s.spaceID != nil {
		db = db.Unscoped().Delete(&space.Space{ID: *s.spaceID})
	}
	require.Nil(s.T(), db.Error)
	//db = db.Unscoped().Delete(&link.WorkItemType{Name: "foo.bug"})

}
// cleanup removes all DB entries that will be created or have been created
// with this test suite. We need to remove them completely and not only set the
// "deleted_at" field, which is why we need the Unscoped() function.
cleanup removes all DB entries that will be created or have been created
with this test suite. We need to remove them completely and not only set the
"deleted_at" field, which is why we need the Unscoped() function.
// cleanup removes all DB entries that will be created or have been created // with this test suite . We need to remove them completely and not only set the // " deleted_at " field which is why we need the Unscoped () function .
func (s *workItemLinkTypeSuite) cleanup() {
	db := s.DB.Unscoped().Delete(&link.WorkItemLinkType{Name: s.linkTypeName})
	require.Nil(s.T(), db.Error)
	db = s.DB.Unscoped().Delete(&link.WorkItemLinkType{Name: s.linkName})
	require.Nil(s.T(), db.Error)
	db = db.Unscoped().Delete(&link.WorkItemLinkCategory{Name: s.categoryName})
	require.Nil(s.T(), db.Error)
	if s.spaceID != nil {
		db = db.Unscoped().Delete(&space.Space{ID: *s.spaceID})
	}
	require.Nil(s.T(), db.Error)
}
func ( s * workItemLinkTypeSuite ) cleanup ( ) { db := s . DB . Unscoped ( ) . Delete ( & link . WorkItemLinkType { Name : s . linkTypeName } ) require . Nil ( s . T ( ) , db . Error ) db = s . DB . Unscoped ( ) . Delete ( & link . WorkItemLinkType { Name : s . linkName } ) require . Nil ( s . T ( ) , db . Error ) db = db . Unscoped ( ) . Delete ( & link . WorkItemLinkCategory { Name : s . categoryName } ) require . Nil ( s . T ( ) , db . Error ) if s . spaceID != nil { db = db . Unscoped ( ) . Delete ( & space . Space { ID : * s . spaceID } ) } require . Nil ( s . T ( ) , db . Error ) }
cleanup removes all DB entries that will be created or have been created
with this test suite.
cleanup removes all DB entries that will be created or have been created with this test suite .
//db = db.Unscoped().Delete(&link.WorkItemType{Name: "foo.bug"})