Skip to content

Commit

Permalink
remove debug print and handle error
Browse files Browse the repository at this point in the history
(cherry picked from commit 4d5f92d)
  • Loading branch information
AnthonyEnr1quez authored and derekbit committed Oct 25, 2022
1 parent 19625e6 commit cc8ec9a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ func runTest(p *PodTestSuite, images []string, waitCondition, volumeType string)

typeCheckCmd := fmt.Sprintf("kubectl get pv $(%s) -o jsonpath='{.spec.%s}'", "kubectl get pv -o jsonpath='{.items[0].metadata.name}'", volumeType)
c := createCmd(p.T(), typeCheckCmd, kustomizeDir, p.config.envs(), nil)
typeCheckOutput, _ := c.CombinedOutput()
fmt.Println(string(typeCheckOutput))
typeCheckOutput, err := c.CombinedOutput()
if err != nil {
p.FailNow("", "failed to check volume type: %v", err)
}
if len(typeCheckOutput) == 0 || !strings.Contains(string(typeCheckOutput), "path") {
p.FailNow("volume Type not correct")
}
Expand Down

0 comments on commit cc8ec9a

Please sign in to comment.