Skip to content
Snippets Groups Projects
Commit 4d5f92d8 authored by AnthonyEnr1quez's avatar AnthonyEnr1quez Committed by Derek Su
Browse files

remove debug print and handle error

parent 0b781318
Branches
Tags
No related merge requests found
......@@ -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")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment