forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Drop GetRunningPodByVirtualMachineInstance from utils
Signed-off-by: Edward Haas <[email protected]>
- Loading branch information
Showing
25 changed files
with
231 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,14 +41,16 @@ import ( | |
"kubevirt.io/kubevirt/tests/console" | ||
"kubevirt.io/kubevirt/tests/decorators" | ||
"kubevirt.io/kubevirt/tests/exec" | ||
"kubevirt.io/kubevirt/tests/libpod" | ||
"kubevirt.io/kubevirt/tests/libvmi" | ||
"kubevirt.io/kubevirt/tests/testsuite" | ||
) | ||
|
||
var _ = Describe("[rfe_id:899][crit:medium][vendor:[email protected]][level:component][sig-compute]Config", decorators.SigCompute, func() { | ||
|
||
var CheckIsoVolumeSizes = func(vmi *v1.VirtualMachineInstance) { | ||
pod := tests.GetRunningPodByVirtualMachineInstance(vmi, vmi.Namespace) | ||
pod, err := libpod.GetPodByVirtualMachineInstance(vmi, vmi.Namespace) | ||
Expect(err).NotTo(HaveOccurred()) | ||
|
||
for _, volume := range vmi.Spec.Volumes { | ||
var path = "" | ||
|
@@ -106,7 +108,9 @@ var _ = Describe("[rfe_id:899][crit:medium][vendor:[email protected]][level:comp | |
CheckIsoVolumeSizes(vmi) | ||
|
||
By("Checking if ConfigMap has been attached to the pod") | ||
vmiPod := tests.GetRunningPodByVirtualMachineInstance(vmi, testsuite.GetTestNamespace(vmi)) | ||
vmiPod, err := libpod.GetPodByVirtualMachineInstance(vmi, vmi.Namespace) | ||
Expect(err).NotTo(HaveOccurred()) | ||
|
||
podOutput, err := exec.ExecuteCommandOnPod( | ||
vmiPod, | ||
vmiPod.Spec.Containers[0].Name, | ||
|
@@ -199,7 +203,8 @@ var _ = Describe("[rfe_id:899][crit:medium][vendor:[email protected]][level:comp | |
CheckIsoVolumeSizes(vmi) | ||
|
||
By("Checking if Secret has been attached to the pod") | ||
vmiPod := tests.GetRunningPodByVirtualMachineInstance(vmi, testsuite.GetTestNamespace(nil)) | ||
vmiPod, err := libpod.GetPodByVirtualMachineInstance(vmi, vmi.Namespace) | ||
Expect(err).NotTo(HaveOccurred()) | ||
podOutput, err := exec.ExecuteCommandOnPod( | ||
vmiPod, | ||
vmiPod.Spec.Containers[0].Name, | ||
|
@@ -271,7 +276,9 @@ var _ = Describe("[rfe_id:899][crit:medium][vendor:[email protected]][level:comp | |
CheckIsoVolumeSizes(vmi) | ||
|
||
By("Checking if ServiceAccount has been attached to the pod") | ||
vmiPod := tests.GetRunningPodByVirtualMachineInstance(vmi, testsuite.GetTestNamespace(vmi)) | ||
vmiPod, err := libpod.GetPodByVirtualMachineInstance(vmi, vmi.Namespace) | ||
Expect(err).NotTo(HaveOccurred()) | ||
|
||
namespace, err := exec.ExecuteCommandOnPod( | ||
vmiPod, | ||
vmiPod.Spec.Containers[0].Name, | ||
|
@@ -371,7 +378,9 @@ var _ = Describe("[rfe_id:899][crit:medium][vendor:[email protected]][level:comp | |
CheckIsoVolumeSizes(vmi) | ||
|
||
By("Checking if ConfigMap has been attached to the pod") | ||
vmiPod := tests.GetRunningPodByVirtualMachineInstance(vmi, testsuite.GetTestNamespace(vmi)) | ||
vmiPod, err := libpod.GetPodByVirtualMachineInstance(vmi, vmi.Namespace) | ||
Expect(err).NotTo(HaveOccurred()) | ||
|
||
podOutputCfgMap, err := exec.ExecuteCommandOnPod( | ||
vmiPod, | ||
vmiPod.Spec.Containers[0].Name, | ||
|
@@ -476,7 +485,9 @@ var _ = Describe("[rfe_id:899][crit:medium][vendor:[email protected]][level:comp | |
CheckIsoVolumeSizes(vmi) | ||
|
||
By("Checking if Secret has been attached to the pod") | ||
vmiPod := tests.GetRunningPodByVirtualMachineInstance(vmi, testsuite.GetTestNamespace(nil)) | ||
vmiPod, err := libpod.GetPodByVirtualMachineInstance(vmi, vmi.Namespace) | ||
Expect(err).NotTo(HaveOccurred()) | ||
|
||
podOutput1, err := exec.ExecuteCommandOnPod( | ||
vmiPod, | ||
vmiPod.Spec.Containers[0].Name, | ||
|
@@ -535,7 +546,9 @@ var _ = Describe("[rfe_id:899][crit:medium][vendor:[email protected]][level:comp | |
CheckIsoVolumeSizes(vmi) | ||
|
||
By("Checking if DownwardAPI has been attached to the pod") | ||
vmiPod := tests.GetRunningPodByVirtualMachineInstance(vmi, testsuite.GetTestNamespace(nil)) | ||
vmiPod, err := libpod.GetPodByVirtualMachineInstance(vmi, vmi.Namespace) | ||
Expect(err).NotTo(HaveOccurred()) | ||
|
||
podOutput, err := exec.ExecuteCommandOnPod( | ||
vmiPod, | ||
vmiPod.Spec.Containers[0].Name, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.