-
Notifications
You must be signed in to change notification settings - Fork 2
wip: make CI stable #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wip: make CI stable #189
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -213,14 +213,15 @@ func ApplyRBDPoolAndSCTemplate(clusterNo int, namespace string) error { //nolint | |||||||
|
|
||||||||
| func GetObject[T any](clusterNo int, kind, namespace, name string) (*T, error) { | ||||||||
| var stdout []byte | ||||||||
| var stderr []byte | ||||||||
| var err error | ||||||||
| if namespace == "" { | ||||||||
| stdout, _, err = Kubectl(clusterNo, nil, "get", kind, name, "-o", "json") | ||||||||
| stdout, stderr, err = Kubectl(clusterNo, nil, "get", kind, name, "-o", "json") | ||||||||
| } else { | ||||||||
| stdout, _, err = Kubectl(clusterNo, nil, "get", kind, "-n", namespace, name, "-o", "json") | ||||||||
| stdout, stderr, err = Kubectl(clusterNo, nil, "get", kind, "-n", namespace, name, "-o", "json") | ||||||||
| } | ||||||||
| if err != nil { | ||||||||
| return nil, err | ||||||||
| return nil, fmt.Errorf("kubectl get %s failed. stderr: %s, err: %w", kind, string(stderr), err) | ||||||||
| } | ||||||||
|
|
||||||||
| var obj T | ||||||||
|
|
@@ -478,11 +479,13 @@ func WriteRandomDataToPV(ctx SpecContext, cluster int, namespace, pvcName string | |||||||
| Eventually(ctx, func() error { | ||||||||
| return ApplyWriteJobTemplate(cluster, namespace, writeJobName, pvcName) | ||||||||
| }).Should(Succeed()) | ||||||||
| var debugJob string // for debugging | ||||||||
| Eventually(ctx, func(g Gomega) { | ||||||||
| job, err := GetJob(cluster, namespace, writeJobName) | ||||||||
| g.Expect(err).NotTo(HaveOccurred()) | ||||||||
| debugJob = job.String() // for debugging | ||||||||
|
||||||||
| debugJob = job.String() // for debugging | |
| debugJobBytes, _ := json.Marshal(job) | |
| debugJob = string(debugJobBytes) // for debugging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
Should()method is being called with multiple separate string arguments, but Gomega expects a single concatenated message string. This will not produce the expected failure message format.Change this to: