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.
Remove more now unnecessary cloud-init payloads
Signed-off-by: Roman Mohr <[email protected]>
- Loading branch information
Showing
7 changed files
with
25 additions
and
63 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 |
---|---|---|
|
@@ -363,9 +363,9 @@ var _ = Describe("[Serial][rfe_id:899][crit:medium][vendor:[email protected]][le | |
|
||
By("Running VMI") | ||
|
||
vmi := tests.NewRandomVMIWithEphemeralDiskAndUserdataHighMemory( | ||
vmi := tests.NewRandomVMIWithEphemeralDiskHighMemory( | ||
cd.ContainerDiskFor( | ||
cd.ContainerDiskFedoraTestTooling), "#!/bin/bash\necho \"fedora\" | passwd fedora --stdin\n") | ||
cd.ContainerDiskFedoraTestTooling)) | ||
tests.AddConfigMapDisk(vmi, configMapName, configMapName) | ||
tests.AddSecretDisk(vmi, secretName, secretName) | ||
tests.AddConfigMapDiskWithCustomLabel(vmi, configMapName, "random1", "configlabel") | ||
|
@@ -401,7 +401,7 @@ var _ = Describe("[Serial][rfe_id:899][crit:medium][vendor:[email protected]][le | |
// mount ConfigMap image | ||
&expect.BSnd{S: "sudo su -\n"}, | ||
&expect.BExp{R: console.PromptExpression}, | ||
&expect.BSnd{S: "mount /dev/vdc /mnt\n"}, | ||
&expect.BSnd{S: "mount /dev/vdb /mnt\n"}, | ||
&expect.BExp{R: console.PromptExpression}, | ||
&expect.BSnd{S: "echo $?\n"}, | ||
&expect.BExp{R: console.RetValue("0")}, | ||
|
@@ -426,7 +426,7 @@ var _ = Describe("[Serial][rfe_id:899][crit:medium][vendor:[email protected]][le | |
|
||
Expect(console.SafeExpectBatch(vmi, []expect.Batcher{ | ||
// mount Secret image | ||
&expect.BSnd{S: "mount /dev/vdd /mnt\n"}, | ||
&expect.BSnd{S: "mount /dev/vdc /mnt\n"}, | ||
&expect.BExp{R: console.PromptExpression}, | ||
&expect.BSnd{S: "echo $?\n"}, | ||
&expect.BExp{R: console.RetValue("0")}, | ||
|
@@ -436,13 +436,13 @@ var _ = Describe("[Serial][rfe_id:899][crit:medium][vendor:[email protected]][le | |
|
||
By("checking that all disk labels match the expectations") | ||
Expect(console.SafeExpectBatch(vmi, []expect.Batcher{ | ||
&expect.BSnd{S: "blkid -s LABEL -o value /dev/vdb\n"}, | ||
&expect.BExp{R: "cfgdata"}, // default value | ||
&expect.BSnd{S: "blkid -s LABEL -o value /dev/vdc\n"}, | ||
&expect.BExp{R: "cfgdata"}, // default value | ||
&expect.BSnd{S: "blkid -s LABEL -o value /dev/vdd\n"}, | ||
&expect.BExp{R: "cfgdata"}, // default value | ||
&expect.BSnd{S: "blkid -s LABEL -o value /dev/vde\n"}, | ||
&expect.BExp{R: "configlabel"}, // custom value | ||
&expect.BSnd{S: "blkid -s LABEL -o value /dev/vdf\n"}, | ||
&expect.BSnd{S: "blkid -s LABEL -o value /dev/vde\n"}, | ||
&expect.BExp{R: "secretlabel"}, // custom value | ||
}, 200)).To(Succeed()) | ||
}) | ||
|
@@ -482,9 +482,9 @@ var _ = Describe("[Serial][rfe_id:899][crit:medium][vendor:[email protected]][le | |
expectedPublicKey := string(publicKeyBytes) | ||
|
||
By("Running VMI") | ||
vmi := tests.NewRandomVMIWithEphemeralDiskAndUserdataHighMemory( | ||
vmi := tests.NewRandomVMIWithEphemeralDiskHighMemory( | ||
cd.ContainerDiskFor( | ||
cd.ContainerDiskFedoraTestTooling), "#!/bin/bash\necho \"fedora\" | passwd fedora --stdin\n") | ||
cd.ContainerDiskFedoraTestTooling)) | ||
tests.AddSecretDisk(vmi, secretName, secretName) | ||
vmi = tests.RunVMIAndExpectLaunch(vmi, 90) | ||
|
||
|
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 |
---|---|---|
|
@@ -2147,9 +2147,11 @@ var _ = Describe("[Serial][rfe_id:393][crit:high][vendor:[email protected]][leve | |
tests.CreateConfigMap(configMapName, config_data) | ||
tests.CreateSecret(secretName, secret_data) | ||
|
||
vmi := tests.NewRandomVMIWithEphemeralDisk(cd.ContainerDiskFor(cd.ContainerDiskFedoraTestTooling)) | ||
vmi.Spec.Domain.Resources.Requests[k8sv1.ResourceMemory] = resource.MustParse(fedoraVMSize) | ||
tests.AddUserData(vmi, "cloud-init", "#cloud-config\npassword: fedora\nchpasswd: { expire: False }\n") | ||
vmi := libvmi.NewTestToolingFedora( | ||
libvmi.WithNetwork(v1.DefaultPodNetwork()), | ||
libvmi.WithInterface(libvmi.InterfaceDeviceWithMasqueradeBinding()), | ||
) | ||
tests.AddUserData(vmi, "cloud-init", "#!/bin/bash\necho 'hello'\n") | ||
tests.AddConfigMapDisk(vmi, configMapName, configMapName) | ||
tests.AddSecretDisk(vmi, secretName, secretName) | ||
tests.AddServiceAccountDisk(vmi, "default") | ||
|
@@ -2161,10 +2163,6 @@ var _ = Describe("[Serial][rfe_id:393][crit:high][vendor:[email protected]][leve | |
} | ||
tests.AddLabelDownwardAPIVolume(vmi, downwardAPIName) | ||
|
||
vmi.Spec.Domain.Devices.Interfaces = []v1.Interface{{Name: "default", Tag: "testnic", | ||
InterfaceBindingMethod: v1.InterfaceBindingMethod{ | ||
Masquerade: &v1.InterfaceMasquerade{}}}} | ||
|
||
Expect(len(vmi.Spec.Domain.Devices.Disks)).To(Equal(6)) | ||
Expect(len(vmi.Spec.Domain.Devices.Interfaces)).To(Equal(1)) | ||
|
||
|
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 |
---|---|---|
|
@@ -540,8 +540,7 @@ var _ = SIGDescribe("[Serial][rfe_id:694][crit:medium][vendor:[email protected]] | |
}) | ||
|
||
It("[test_id:1778]should offer extra dhcp options to pod iface", func() { | ||
userData := "#cloud-config\npassword: fedora\nchpasswd: { expire: False }\n" | ||
dhcpVMI := tests.NewRandomVMIWithEphemeralDiskAndUserdata(cd.ContainerDiskFor(cd.ContainerDiskFedoraTestTooling), userData) | ||
dhcpVMI := tests.NewRandomVMIWithEphemeralDisk(cd.ContainerDiskFor(cd.ContainerDiskFedoraTestTooling)) | ||
tests.AddExplicitPodNetworkInterface(dhcpVMI) | ||
|
||
dhcpVMI.Spec.Domain.Resources.Requests[k8sv1.ResourceName("memory")] = resource.MustParse("1024M") | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,7 +69,7 @@ var _ = Describe("[Serial][rfe_id:151][crit:high][vendor:[email protected]][leve | |
Context("with IgnitionData annotation", func() { | ||
Context("with injected data", func() { | ||
It("[test_id:1616]should have injected data under firmware directory", func() { | ||
vmi := tests.NewRandomVMIWithEphemeralDiskAndUserdataHighMemory(cd.ContainerDiskFor(cd.ContainerDiskFedoraTestTooling), "#!/bin/sh\n\necho fedora| passwd --stdin fedora\n") | ||
vmi := tests.NewRandomVMIWithEphemeralDiskHighMemory(cd.ContainerDiskFor(cd.ContainerDiskFedoraTestTooling)) | ||
|
||
ignitionData := "ignition injected" | ||
vmi.Annotations = map[string]string{v1.IgnitionAnnotation: ignitionData} | ||
|