mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
node: e2e: Add descriptive messages for operation/error checks
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
This commit is contained in:
parent
62e4d39c2f
commit
213a6edc57
@ -80,10 +80,10 @@ var _ = SIGDescribe("ContainerLogRotation [Slow] [Serial] [Disruptive]", func()
|
||||
ginkgo.It("should be rotated and limited to a fixed amount of files", func(ctx context.Context) {
|
||||
|
||||
ginkgo.By("get container log path")
|
||||
framework.ExpectEqual(len(logRotationPod.Status.ContainerStatuses), 1)
|
||||
framework.ExpectEqual(len(logRotationPod.Status.ContainerStatuses), 1, "log rotation pod should have one container")
|
||||
id := kubecontainer.ParseContainerID(logRotationPod.Status.ContainerStatuses[0].ContainerID).ID
|
||||
r, _, err := getCRIClient()
|
||||
framework.ExpectNoError(err)
|
||||
framework.ExpectNoError(err, "should connect to CRI and obtain runtime service clients and image service client")
|
||||
resp, err := r.ContainerStatus(context.Background(), id, false)
|
||||
framework.ExpectNoError(err)
|
||||
logPath := resp.GetStatus().GetLogPath()
|
||||
|
@ -106,16 +106,16 @@ func testDevicePlugin(f *framework.Framework, pluginSockDir string) {
|
||||
}, time.Minute, time.Second).Should(gomega.BeTrue())
|
||||
|
||||
v1alphaPodResources, err = getV1alpha1NodeDevices()
|
||||
framework.ExpectNoError(err)
|
||||
framework.ExpectNoError(err, "should get node local podresources by accessing the (v1alpha) podresources API endpoint")
|
||||
|
||||
v1PodResources, err = getV1NodeDevices()
|
||||
framework.ExpectNoError(err)
|
||||
framework.ExpectNoError(err, "should get node local podresources by accessing the (v1) podresources API endpoint")
|
||||
|
||||
// Before we run the device plugin test, we need to ensure
|
||||
// that the cluster is in a clean state and there are no
|
||||
// pods running on this node.
|
||||
framework.ExpectEqual(len(v1alphaPodResources.PodResources), 0)
|
||||
framework.ExpectEqual(len(v1PodResources.PodResources), 0)
|
||||
gomega.Expect(v1alphaPodResources.PodResources).To(gomega.BeEmpty(), "should have no pod resources")
|
||||
gomega.Expect(v1PodResources.PodResources).To(gomega.BeEmpty(), "should have no pod resources")
|
||||
|
||||
ginkgo.By("Scheduling a sample device plugin pod")
|
||||
data, err := e2etestfiles.Read(SampleDevicePluginDSYAML)
|
||||
|
Loading…
Reference in New Issue
Block a user