(ctx context.Context)
| 220 | } |
| 221 | |
| 222 | func (ctl *controller) initWorkspaceProfile(ctx context.Context) error { |
| 223 | // Don't set external_url in the database if it's set via profile (command-line flag), |
| 224 | // as our validation will reject it. The profile value takes precedence at runtime. |
| 225 | _, err := ctl.settingServiceClient.UpdateSetting(ctx, connect.NewRequest(&v1pb.UpdateSettingRequest{ |
| 226 | AllowMissing: true, |
| 227 | Setting: &v1pb.Setting{ |
| 228 | Name: "settings/" + v1pb.Setting_WORKSPACE_PROFILE.String(), |
| 229 | Value: &v1pb.SettingValue{ |
| 230 | Value: &v1pb.SettingValue_WorkspaceProfile{ |
| 231 | WorkspaceProfile: &v1pb.WorkspaceProfileSetting{ |
| 232 | DisallowSignup: false, |
| 233 | }, |
| 234 | }, |
| 235 | }, |
| 236 | }, |
| 237 | UpdateMask: &fieldmaskpb.FieldMask{ |
| 238 | Paths: []string{ |
| 239 | "value.workspace_profile.disallow_signup", |
| 240 | }, |
| 241 | }, |
| 242 | })) |
| 243 | return err |
| 244 | } |
| 245 | |
| 246 | // GetTestProfileWithExternalPg will return a profile for testing with external Postgres. |
| 247 | // We require port as an argument of GetTestProfile so that test can run in parallel in different ports, |
no test coverage detected