Fix tests

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2024-03-28 18:23:49 +00:00
parent 0152b21529
commit 9384e37bb1
22 changed files with 652 additions and 396 deletions

View file

@ -66,12 +66,16 @@ func (s *PoolsTestSuite) SetupTest() {
s.FailNow(fmt.Sprintf("failed to create org: %s", err))
}
entity := params.GithubEntity{
ID: org.ID,
EntityType: params.GithubEntityTypeOrganization,
}
// create some pool objects in the database, for testing purposes
orgPools := []params.Pool{}
for i := 1; i <= 3; i++ {
pool, err := db.CreateOrganizationPool(
pool, err := db.CreateEntityPool(
context.Background(),
org.ID,
entity,
params.CreatePoolParams{
ProviderName: "test-provider",
MaxRunners: 4,