mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
Changes to e2e to accomodate client-go changes and RunKubectlInput
With client-go v1.18.0 there is a change where Signatures on methods in generated clientsets, dynamic, metadata, and scale clients have been modified to accept context.Context as a first argument. Signatures of Create, Update, and Patch methods have been updated to accept CreateOptions, UpdateOptions and PatchOptions respectively. Signatures of Delete and DeleteCollection methods now accept DeleteOptions by value instead of by reference The framework.RunkubectlInput now accepts namespace as the first parameter which is also accommodated with this PR. Signed-off-by: Humble Chirammal hchiramm@redhat.com
This commit is contained in:
committed by
mergify[bot]
parent
60a394b397
commit
4c96ad3c85
@ -13,6 +13,7 @@ limitations under the License.
|
||||
package e2e
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -28,7 +29,7 @@ func logsCSIPods(label string, c clientset.Interface) {
|
||||
opt := metav1.ListOptions{
|
||||
LabelSelector: label,
|
||||
}
|
||||
podList, err := c.CoreV1().Pods(cephCSINamespace).List(opt)
|
||||
podList, err := c.CoreV1().Pods(cephCSINamespace).List(context.TODO(), opt)
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to list pods with selector %s %v", label, err)
|
||||
return
|
||||
@ -62,7 +63,7 @@ func getPreviousPodLogs(c clientset.Interface, namespace, podName, containerName
|
||||
Name(podName).SubResource("log").
|
||||
Param("container", containerName).
|
||||
Param("previous", strconv.FormatBool(true)).
|
||||
Do().
|
||||
Do(context.TODO()).
|
||||
Raw()
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
Reference in New Issue
Block a user