(ctx context.Context, t *testing.T, db database.Store)
| 639 | } |
| 640 | |
| 641 | func configureDeployment(ctx context.Context, t *testing.T, db database.Store) (uuid.UUID, string) { |
| 642 | t.Helper() |
| 643 | deploymentID := uuid.New() |
| 644 | err := db.InsertDeploymentID(ctx, deploymentID.String()) |
| 645 | require.NoError(t, err) |
| 646 | |
| 647 | licenseRaw := coderdenttest.GenerateLicense(t, coderdenttest.LicenseOptions{ |
| 648 | PublishUsageData: true, |
| 649 | }) |
| 650 | _, err = db.InsertLicense(ctx, database.InsertLicenseParams{ |
| 651 | UploadedAt: dbtime.Now(), |
| 652 | JWT: licenseRaw, |
| 653 | Exp: dbtime.Now().Add(48 * time.Hour), |
| 654 | UUID: uuid.New(), |
| 655 | }) |
| 656 | require.NoError(t, err) |
| 657 | |
| 658 | return deploymentID, licenseRaw |
| 659 | } |
| 660 | |
| 661 | func configureMockDeployment(t *testing.T, db *dbmock.MockStore) (uuid.UUID, string) { |
| 662 | t.Helper() |
no test coverage detected