(t *testing.T)
| 307 | now := time.Now().UTC() |
| 308 | g.RevokedAt = &now |
| 309 | g.PasswordHash = "" |
| 310 | } |
| 311 | s.revokedGrants = append(s.revokedGrants, credentialID) |
| 312 | return nil |
| 313 | } |
| 314 | } |
| 315 | return configstore.ErrServiceCredentialNotFound |
| 316 | } |
| 317 | |
| 318 | func (s *fakeAPIStore) GetManagedWarehouse(orgID string) (*configstore.ManagedWarehouse, error) { |
| 319 | warehouse, ok := s.warehouses[orgID] |
| 320 | if !ok { |
| 321 | return nil, gorm.ErrRecordNotFound |
| 322 | } |
| 323 | return copyWarehouse(warehouse), nil |
| 324 | } |
| 325 | |
| 326 | func (s *fakeAPIStore) UpsertManagedWarehouse(orgID string, warehouse *configstore.ManagedWarehouse) (*configstore.ManagedWarehouse, bool, error) { |
| 327 | org, ok := s.orgs[orgID] |
| 328 | if !ok { |
| 329 | return nil, false, nil |
| 330 | } |
| 331 | clone := copyWarehouse(warehouse) |
| 332 | clone.OrgID = orgID |
| 333 | s.warehouses[orgID] = clone |
| 334 | org.Warehouse = copyWarehouse(clone) |
| 335 | return copyWarehouse(clone), true, nil |
| 336 | } |
| 337 |
nothing calls this directly
no test coverage detected