Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aganesh-suse committed Apr 4, 2024
1 parent 193be93 commit 25160aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions pkg/testcase/secretsencrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,15 @@ func waitForHashMatch(cpIp, product string, defaultTime time.Duration, times int
var secretEncryptStatus string
var errGetStatus error
for i := 1; i <= times; i++ {
secretEncryptStatus, errGetStatus := shared.SecretEncryptOps("status", cpIp, product)
secretEncryptStatus, errGetStatus = shared.SecretEncryptOps("status", cpIp, product)
if errGetStatus != nil {
shared.LogLevel("DEBUG", "error getting secret-encryption status. Retry.")
}
if secretEncryptStatus != "" && strings.Contains(secretEncryptStatus, "All hashes match") {
shared.LogLevel("DEBUG", "Total sleep time before hashes matched: %d seconds", i*int(defaultTime))
return secretEncryptStatus, nil
} else {
time.Sleep(defaultTime * time.Second)
}
time.Sleep(defaultTime * time.Second)
}
shared.LogLevel("WARN", "Hashes did not match after %d seconds", times*int(defaultTime))
return secretEncryptStatus, errGetStatus
Expand Down Expand Up @@ -139,7 +138,9 @@ func getNodeIps(nodes []shared.Node) []string {
var nodeIps []string
for _, node := range nodes {
nodeIps = append(nodeIps, node.ExternalIP)
shared.LogLevel("DEBUG", "Node details: name: %s status: %s roles: %s external ip: %s", node.Name, node.Status, node.Roles, node.ExternalIP)
shared.LogLevel("DEBUG",
"Node details: name: %s status: %s roles: %s external ip: %s",
node.Name, node.Status, node.Roles, node.ExternalIP)
}
return nodeIps
}
Expand Down
2 changes: 1 addition & 1 deletion shared/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ func WaitForPodsRunning(defaultTime time.Duration, times int, print bool) error
}
}
if !podsRunning {
ReturnLogError("All pods were not up at the end of wait period %d", int(defaultTime)*times)
return ReturnLogError("All pods were not up at the end of wait period %d", int(defaultTime)*times)
}
return nil
}

0 comments on commit 25160aa

Please sign in to comment.