Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
all-seeing-code committed Aug 2, 2023
1 parent a5abc73 commit 9c3ead9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dgraphtest/local_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,9 @@ func (c *LocalCluster) checkDgraphVersion(containerID string) error {
return errors.Wrapf(err, "error during checkDgraphVersion for container [%v]", containerID)
}

// During in-place upgrade, container remains same but logs have version string twice - once for old version, once for new.
// Want new version string. Look bottom-up using LastIndex to get latest version's string.
// During in-place upgrade, container remains same but logs have version string twice
// once for old version, once for new. Want new version string. Look bottom-up using
// LastIndex to get latest version's string.
index := strings.LastIndex(contLogs, "Commit SHA-1 : ")
running := strings.Fields(contLogs[index : index+70])[3] // 70 is arbitrary
chash, err := getHash(c.GetVersion())
Expand Down

0 comments on commit 9c3ead9

Please sign in to comment.