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

Method TestDeleteRepository

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

Source from the content-addressed store, hash-verified

500}
501
502func (s *RepoTestSuite) TestDeleteRepository() {
503 err := s.Store.DeleteRepository(s.adminCtx, s.Fixtures.Repos[0].ID)
504
505 s.Require().Nil(err)
506 _, err = s.Store.GetRepositoryByID(s.adminCtx, s.Fixtures.Repos[0].ID)
507 s.Require().NotNil(err)
508 s.Require().Equal("error fetching repo: not found", err.Error())
509}
510
511func (s *RepoTestSuite) TestDeleteRepositoryInvalidRepoID() {
512 err := s.Store.DeleteRepository(s.adminCtx, "dummy-repo-id")

Callers

nothing calls this directly

Calls 3

DeleteRepositoryMethod · 0.65
GetRepositoryByIDMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected