expectUpdateWorkspaceDeletedByID asserts a call to UpdateWorkspaceDeletedByID and runs the provided assertions against it. It also expects the follow-up SoftDeleteWorkspaceAgentsByWorkspaceID call that wsbuilder.Builder.Build now issues inside the same orphan-delete transaction.
(assertions func(params database.UpdateWorkspaceDeletedByIDParams))
| 1517 | // SoftDeleteWorkspaceAgentsByWorkspaceID call that wsbuilder.Builder.Build now |
| 1518 | // issues inside the same orphan-delete transaction. |
| 1519 | func expectUpdateWorkspaceDeletedByID(assertions func(params database.UpdateWorkspaceDeletedByIDParams)) func(mTx *dbmock.MockStore) { |
| 1520 | return func(mTx *dbmock.MockStore) { |
| 1521 | mTx.EXPECT().UpdateWorkspaceDeletedByID(gomock.Any(), gomock.Any()). |
| 1522 | Times(1). |
| 1523 | DoAndReturn( |
| 1524 | func(ctx context.Context, params database.UpdateWorkspaceDeletedByIDParams) error { |
| 1525 | assertions(params) |
| 1526 | return nil |
| 1527 | }, |
| 1528 | ) |
| 1529 | mTx.EXPECT().SoftDeleteWorkspaceAgentsByWorkspaceID(gomock.Any(), gomock.Any()). |
| 1530 | Times(1). |
| 1531 | Return(nil) |
| 1532 | } |
| 1533 | } |
| 1534 | |
| 1535 | // expectGetProvisionerJobByID asserts a call to GetProvisionerJobByID |
| 1536 | // and runs the provided assertions against it. |
no test coverage detected