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

Method TestCreateRepositoryAlreadyExists

runner/repositories_test.go:227–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

225}
226
227func (s *RepoTestSuite) TestCreateRepositoryAlreadyExists() {
228 // this is already created in `SetupTest()`
229 s.Fixtures.CreateRepoParams.Owner = "test-owner-1"
230 s.Fixtures.CreateRepoParams.Name = "test-repo-1"
231
232 _, err := s.Runner.CreateRepository(s.Fixtures.AdminContext, s.Fixtures.CreateRepoParams)
233
234 s.Require().Equal(runnerErrors.NewConflictError("repository %s/%s already exists", s.Fixtures.CreateRepoParams.Owner, s.Fixtures.CreateRepoParams.Name), err)
235}
236
237func (s *RepoTestSuite) TestCreateRepositoryPoolMgrFailed() {
238 s.Fixtures.PoolMgrCtrlMock.On("CreateRepoPoolManager", s.Fixtures.AdminContext, mock.AnythingOfType("params.Repository"), s.Fixtures.Providers, s.Fixtures.Store).Return(s.Fixtures.PoolMgrMock, s.Fixtures.ErrMock)

Callers

nothing calls this directly

Calls 1

CreateRepositoryMethod · 0.65

Tested by

no test coverage detected