validateConfigUpdate combines the results of validate and validateChanges.
(ctx context.Context, old DbConfig, validateOIDCConfig bool)
| 711 | |
| 712 | // validateConfigUpdate combines the results of validate and validateChanges. |
| 713 | func (dbConfig *DbConfig) validateConfigUpdate(ctx context.Context, old DbConfig, validateOIDCConfig bool) error { |
| 714 | validateReplications := false |
| 715 | err := dbConfig.validate(ctx, validateOIDCConfig, validateReplications) |
| 716 | var multiErr *base.MultiError |
| 717 | if !errors.As(err, &multiErr) { |
| 718 | multiErr = multiErr.Append(err) |
| 719 | } |
| 720 | multiErr = multiErr.Append(dbConfig.validateChanges(ctx, old)) |
| 721 | return multiErr.ErrorOrNil() |
| 722 | } |
| 723 | |
| 724 | // validateChanges compares the current DbConfig with the "old" config, and returns an error if any disallowed changes |
| 725 | // are attempted. |
no test coverage detected