func (s *workItemChildSuite) SetupSuite() {
	s.DBTestSuite.SetupSuite()
	ctx := migration.NewMigrationContext(context.Background())
	s.DBTestSuite.PopulateDBTestSuite(ctx)

	s.db = gormapplication.NewGormDB(s.DB)

	testIdentity, err := testsupport.CreateTestIdentity(s.DB, "workItemChildSuite user", "test provider")
	require.Nil(s.T(), err)
	s.testIdentity = testIdentity

	priv, err := almtoken.ParsePrivateKey([]byte(almtoken.RSAPrivateKey))
	require.Nil(s.T(), err)

	svc := testsupport.ServiceAsUser("WorkItemLink-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.workItemLinkCtrl = NewWorkItemLinkController(svc, s.db)
	require.NotNil(s.T(), s.workItemLinkCtrl)

	svc = testsupport.ServiceAsUser("WorkItemLinkType-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.workItemLinkTypeCtrl = NewWorkItemLinkTypeController(svc, s.db)
	require.NotNil(s.T(), s.workItemLinkTypeCtrl)

	svc = testsupport.ServiceAsUser("WorkItemLinkCategory-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.workItemLinkCategoryCtrl = NewWorkItemLinkCategoryController(svc, s.db)
	require.NotNil(s.T(), s.workItemLinkCategoryCtrl)

	svc = testsupport.ServiceAsUser("WorkItemType-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.typeCtrl = NewWorkitemtypeController(svc, s.db, wiConfiguration)
	require.NotNil(s.T(), s.typeCtrl)

	svc = testsupport.ServiceAsUser("WorkItemLink-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.workItemLinkCtrl = NewWorkItemLinkController(svc, s.db)
	require.NotNil(s.T(), s.workItemLinkCtrl)

	svc = testsupport.ServiceAsUser("WorkItemRelationshipsLinks-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.workItemRelsLinksCtrl = NewWorkItemRelationshipsLinksController(svc, s.db)
	require.NotNil(s.T(), s.workItemRelsLinksCtrl)

	svc = testsupport.ServiceAsUser("TestWorkItem-Service", almtoken.NewManagerWithPrivateKey(priv), testIdentity)
	require.NotNil(s.T(), svc)
	s.svc = svc
	s.workItemCtrl = NewWorkitemController(svc, s.db, s.Configuration)
	require.NotNil(s.T(), s.workItemCtrl)

	svc = testsupport.ServiceAsUser("Space-Service", almtoken.NewManagerWithPrivateKey(priv), testIdentity)
	require.NotNil(s.T(), svc)
	s.spaceCtrl = NewSpaceController(svc, s.db, wiConfiguration, &DummyResourceManager{})
	require.NotNil(s.T(), s.spaceCtrl)

}
// The SetupSuite method will run before the tests in the suite are run.
// It sets up a database connection for all the tests in this suite without polluting global space.
The SetupSuite method will run before the tests in the suite are run.
It sets up a database connection for all the tests in this suite without polluting global space.
// The SetupSuite method will run before the tests in the suite are run . // It sets up a database connection for all the tests in this suite without polluting global space .
func (s *workItemChildSuite) SetupSuite() {
	s.DBTestSuite.SetupSuite()
	ctx := migration.NewMigrationContext(context.Background())
	s.DBTestSuite.PopulateDBTestSuite(ctx)
	s.db = gormapplication.NewGormDB(s.DB)
	testIdentity, err := testsupport.CreateTestIdentity(s.DB, "workItemChildSuite user", "test provider")
	require.Nil(s.T(), err)
	s.testIdentity = testIdentity
	priv, err := almtoken.ParsePrivateKey([]byte(almtoken.RSAPrivateKey))
	require.Nil(s.T(), err)
	svc := testsupport.ServiceAsUser("WorkItemLink-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.workItemLinkCtrl = NewWorkItemLinkController(svc, s.db)
	require.NotNil(s.T(), s.workItemLinkCtrl)
	svc = testsupport.ServiceAsUser("WorkItemLinkType-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.workItemLinkTypeCtrl = NewWorkItemLinkTypeController(svc, s.db)
	require.NotNil(s.T(), s.workItemLinkTypeCtrl)
	svc = testsupport.ServiceAsUser("WorkItemLinkCategory-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.workItemLinkCategoryCtrl = NewWorkItemLinkCategoryController(svc, s.db)
	require.NotNil(s.T(), s.workItemLinkCategoryCtrl)
	svc = testsupport.ServiceAsUser("WorkItemType-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.typeCtrl = NewWorkitemtypeController(svc, s.db, wiConfiguration)
	require.NotNil(s.T(), s.typeCtrl)
	svc = testsupport.ServiceAsUser("WorkItemLink-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.workItemLinkCtrl = NewWorkItemLinkController(svc, s.db)
	require.NotNil(s.T(), s.workItemLinkCtrl)
	svc = testsupport.ServiceAsUser("WorkItemRelationshipsLinks-Service", almtoken.NewManagerWithPrivateKey(priv), s.testIdentity)
	require.NotNil(s.T(), svc)
	s.workItemRelsLinksCtrl = NewWorkItemRelationshipsLinksController(svc, s.db)
	require.NotNil(s.T(), s.workItemRelsLinksCtrl)
	svc = testsupport.ServiceAsUser("TestWorkItem-Service", almtoken.NewManagerWithPrivateKey(priv), testIdentity)
	require.NotNil(s.T(), svc)
	s.svc = svc
	s.workItemCtrl = NewWorkitemController(svc, s.db, s.Configuration)
	require.NotNil(s.T(), s.workItemCtrl)
	svc = testsupport.ServiceAsUser("Space-Service", almtoken.NewManagerWithPrivateKey(priv), testIdentity)
	require.NotNil(s.T(), svc)
	s.spaceCtrl = NewSpaceController(svc, s.db, wiConfiguration, &DummyResourceManager{})
	require.NotNil(s.T(), s.spaceCtrl)
}
func ( s * workItemChildSuite ) SetupSuite ( ) { s . DBTestSuite . SetupSuite ( ) ctx := migration . NewMigrationContext ( context . Background ( ) ) s . DBTestSuite . PopulateDBTestSuite ( ctx ) s . db = gormapplication . NewGormDB ( s . DB ) testIdentity , err := testsupport . CreateTestIdentity ( s . DB , " " , " " ) require . Nil ( s . T ( ) , err ) s . testIdentity = testIdentity priv , err := almtoken . ParsePrivateKey ( [ ] byte ( almtoken . RSAPrivateKey ) ) require . Nil ( s . T ( ) , err ) svc := testsupport . ServiceAsUser ( " " , almtoken . NewManagerWithPrivateKey ( priv ) , s . testIdentity ) require . NotNil ( s . T ( ) , svc ) s . workItemLinkCtrl = NewWorkItemLinkController ( svc , s . db ) require . NotNil ( s . T ( ) , s . workItemLinkCtrl ) svc = testsupport . ServiceAsUser ( " " , almtoken . NewManagerWithPrivateKey ( priv ) , s . testIdentity ) require . NotNil ( s . T ( ) , svc ) s . workItemLinkTypeCtrl = NewWorkItemLinkTypeController ( svc , s . db ) require . NotNil ( s . T ( ) , s . workItemLinkTypeCtrl ) svc = testsupport . ServiceAsUser ( " " , almtoken . NewManagerWithPrivateKey ( priv ) , s . testIdentity ) require . NotNil ( s . T ( ) , svc ) s . workItemLinkCategoryCtrl = NewWorkItemLinkCategoryController ( svc , s . db ) require . NotNil ( s . T ( ) , s . workItemLinkCategoryCtrl ) svc = testsupport . ServiceAsUser ( " " , almtoken . NewManagerWithPrivateKey ( priv ) , s . testIdentity ) require . NotNil ( s . T ( ) , svc ) s . typeCtrl = NewWorkitemtypeController ( svc , s . db , wiConfiguration ) require . NotNil ( s . T ( ) , s . typeCtrl ) svc = testsupport . ServiceAsUser ( " " , almtoken . NewManagerWithPrivateKey ( priv ) , s . testIdentity ) require . NotNil ( s . T ( ) , svc ) s . workItemLinkCtrl = NewWorkItemLinkController ( svc , s . db ) require . NotNil ( s . T ( ) , s . workItemLinkCtrl ) svc = testsupport . ServiceAsUser ( " " , almtoken . NewManagerWithPrivateKey ( priv ) , s . testIdentity ) require . NotNil ( s . T ( ) , svc ) s . workItemRelsLinksCtrl = NewWorkItemRelationshipsLinksController ( svc , s . db ) require . NotNil ( s . T ( ) , s . workItemRelsLinksCtrl ) svc = testsupport . ServiceAsUser ( " " , almtoken . NewManagerWithPrivateKey ( priv ) , testIdentity ) require . NotNil ( s . T ( ) , svc ) s . svc = svc s . workItemCtrl = NewWorkitemController ( svc , s . db , s . Configuration ) require . NotNil ( s . T ( ) , s . workItemCtrl ) svc = testsupport . ServiceAsUser ( " " , almtoken . NewManagerWithPrivateKey ( priv ) , testIdentity ) require . NotNil ( s . T ( ) , svc ) s . spaceCtrl = NewSpaceController ( svc , s . db , wiConfiguration , & DummyResourceManager { } ) require . NotNil ( s . T ( ) , s . spaceCtrl ) }
The SetupSuite method will run before the tests in the suite are run.
The SetupSuite method will run before the tests in the suite are run .