| 1776 | } |
| 1777 | |
| 1778 | func DeploymentValues(t testing.TB, mut ...func(*codersdk.DeploymentValues)) *codersdk.DeploymentValues { |
| 1779 | cfg := &codersdk.DeploymentValues{} |
| 1780 | opts := cfg.Options() |
| 1781 | err := opts.SetDefaults() |
| 1782 | require.NoError(t, err) |
| 1783 | for _, fn := range mut { |
| 1784 | fn(cfg) |
| 1785 | } |
| 1786 | return cfg |
| 1787 | } |
| 1788 | |
| 1789 | // GetProvisionerForTags returns the first valid provisioner for a workspace + template tags. |
| 1790 | func GetProvisionerForTags(tx database.Store, curTime time.Time, orgID uuid.UUID, tags map[string]string) (database.ProvisionerDaemon, error) { |