Skip to content

Commit

Permalink
Pr comment fix
Browse files Browse the repository at this point in the history
Signed-off-by: Vipin Yadav <vipin.yadav@progress.com>
  • Loading branch information
vipin230 committed Jul 11, 2023
1 parent 82bc928 commit d7f0f5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/automate-cli/cmd/chef-automate/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ func getExistingAndRequestedConfigForPostgres(args []string, infra *AutomateHAIn
//Getting Existing config from server
var existingConfig PostgresqlConfig
var reqConfig PostgresqlConfig
var dummyConfig PostgresqlConfig
var emptyConfig PostgresqlConfig
srcInputString, err := getConfigFromRemoteServer(infra, postgresql, config, sshUtil)
if err != nil {
return existingConfig, reqConfig, errors.Wrapf(err, "Unable to get config from the server with error")
Expand All @@ -1008,7 +1008,7 @@ func getExistingAndRequestedConfigForPostgres(args []string, infra *AutomateHAIn
return existingConfig, reqConfig, err
}
reqConfig = reqConfigInterface.(PostgresqlConfig)
if !isConfigChanged(dummyConfig, reqConfig) {
if !isConfigChanged(emptyConfig, reqConfig) {
return existingConfig, reqConfig, status.Annotate(errors.New("Incorrect Config"), status.ConfigError)
}
mergo.Merge(&reqConfig, existingConfig)
Expand All @@ -1020,7 +1020,7 @@ func getExistingAndRequestedConfigForOpenSearch(args []string, infra *AutomateHA
//Getting Existing config from server
var existingConfig OpensearchConfig
var reqConfig OpensearchConfig
var dummyConfig OpensearchConfig
var emptyConfig OpensearchConfig
srcInputString, err := getConfigFromRemoteServer(infra, opensearch_const, config, sshUtil)
if err != nil {
return existingConfig, reqConfig, errors.Wrapf(err, "Unable to get config from the server with error")
Expand All @@ -1037,7 +1037,7 @@ func getExistingAndRequestedConfigForOpenSearch(args []string, infra *AutomateHA
return existingConfig, reqConfig, err
}
reqConfig = reqConfigInterface.(OpensearchConfig)
if !isConfigChanged(dummyConfig, reqConfig) {
if !isConfigChanged(emptyConfig, reqConfig) {
return existingConfig, reqConfig, status.Annotate(errors.New("Incorrect Config"), status.ConfigError)
}
mergo.Merge(&reqConfig, existingConfig)
Expand Down

0 comments on commit d7f0f5e

Please sign in to comment.