MCPcopy Create free account
hub / github.com/cloudbase/garm / TestCreateRepositoryPool

Method TestCreateRepositoryPool

database/sql/repositories_test.go:710–725  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

708}
709
710func (s *RepoTestSuite) TestCreateRepositoryPool() {
711 entity, err := s.Fixtures.Repos[0].GetEntity()
712 s.Require().Nil(err)
713 pool, err := s.Store.CreateEntityPool(s.adminCtx, entity, s.Fixtures.CreatePoolParams)
714
715 s.Require().Nil(err)
716 repo, err := s.Store.GetRepositoryByID(s.adminCtx, s.Fixtures.Repos[0].ID)
717 if err != nil {
718 s.FailNow(fmt.Sprintf("cannot get repo by ID: %v", err))
719 }
720 s.Require().Equal(1, len(repo.Pools))
721 s.Require().Equal(pool.ID, repo.Pools[0].ID)
722 s.Require().Equal(s.Fixtures.CreatePoolParams.ProviderName, repo.Pools[0].ProviderName)
723 s.Require().Equal(s.Fixtures.CreatePoolParams.MaxRunners, repo.Pools[0].MaxRunners)
724 s.Require().Equal(s.Fixtures.CreatePoolParams.MinIdleRunners, repo.Pools[0].MinIdleRunners)
725}
726
727func (s *RepoTestSuite) TestCreateRepositoryPoolMissingTags() {
728 s.Fixtures.CreatePoolParams.Tags = []string{}

Callers

nothing calls this directly

Calls 3

GetEntityMethod · 0.65
CreateEntityPoolMethod · 0.65
GetRepositoryByIDMethod · 0.65

Tested by

no test coverage detected