Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelightning committed Sep 6, 2023
1 parent e31cca3 commit f00f303
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion command/snapshot/save/snapshot_save.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (c *cmd) Run(args []string) int {
c.UI.Error(fmt.Sprintf("Error fetching version of Consul agent Leader: %s", err))
return 1
}
version := ""
var version string
for _, server := range operatorHealthResponse.Servers {
if server.Leader {
version = server.Version
Expand Down
5 changes: 3 additions & 2 deletions command/snapshot/save/snapshot_save_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ func TestSnapshotSaveCommandWithAppendFileNameFlag(t *testing.T) {

datacenter := dc.(string)

operatorHealth, _ := client.Operator().AutopilotServerHealth(nil)
operatorHealth, error := client.Operator().AutopilotServerHealth(nil)
require.NoError(t, error)

version := ""
var version string
for _, server := range operatorHealth.Servers {
if server.Leader {
version = server.Version
Expand Down

0 comments on commit f00f303

Please sign in to comment.