()
| 149 | } |
| 150 | |
| 151 | func (s *PoolsTestSuite) TestListAllPoolsDBFetchErr() { |
| 152 | s.Fixtures.SQLMock. |
| 153 | ExpectQuery(regexp.QuoteMeta("SELECT `pools`.`id`,`pools`.`created_at`,`pools`.`updated_at`,`pools`.`deleted_at`,`pools`.`provider_name`,`pools`.`runner_prefix`,`pools`.`max_runners`,`pools`.`min_idle_runners`,`pools`.`runner_bootstrap_timeout`,`pools`.`image`,`pools`.`flavor`,`pools`.`os_type`,`pools`.`os_arch`,`pools`.`enabled`,`pools`.`git_hub_runner_group`,`pools`.`enable_shell`,`pools`.`generation`,`pools`.`repo_id`,`pools`.`org_id`,`pools`.`enterprise_id`,`pools`.`template_id`,`pools`.`priority` FROM `pools` WHERE `pools`.`deleted_at` IS NULL")). |
| 154 | WillReturnError(fmt.Errorf("mocked fetching all pools error")) |
| 155 | |
| 156 | _, err := s.StoreSQLMocked.ListAllPools(s.adminCtx) |
| 157 | |
| 158 | s.assertSQLMockExpectations() |
| 159 | s.Require().NotNil(err) |
| 160 | s.Require().Equal("error fetching all pools: mocked fetching all pools error", err.Error()) |
| 161 | } |
| 162 | |
| 163 | func (s *PoolsTestSuite) TestGetPoolByID() { |
| 164 | pool, err := s.Store.GetPoolByID(s.adminCtx, s.Fixtures.Pools[0].ID) |
nothing calls this directly
no test coverage detected