Switch remaining ptp tests to use ptp with tuning plugin to avoid 0xFE errors
By using the ptp tuning we rely on kubemacpool to assign a valid mac address and avoid randomly generated 0xFE macaddress that are rejected by libvirt.
@@ -28,7 +28,6 @@ import (
expect "github.com/google/goexpect"
. "github.com/onsi/ginkgo"
- "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
appsv1 "k8s.io/api/apps/v1"
k8sv1 "k8s.io/api/core/v1"
@@ -131,14 +130,6 @@ var _ = Describe("Multus", func() {
Do()
Expect(result.Error()).NotTo(HaveOccurred())
- // Create a ptp crd
- result = virtClient.RestClient().
- Post().
- RequestURI(fmt.Sprintf(postUrl, tests.NamespaceTestDefault, "ptp-conf")).
- Body([]byte(fmt.Sprintf(ptpConfCRD, "ptp-conf", tests.NamespaceTestDefault))).
- Do()
- Expect(result.Error()).NotTo(HaveOccurred())
-
// Create ptp crds with tuning plugin enabled in two different namespaces
result = virtClient.RestClient().
Post().
@@ -237,7 +228,7 @@ var _ = Describe("Multus", func() {
detachedVMI.Spec.Networks = []v1.Network{
{Name: "ptp", NetworkSource: v1.NetworkSource{
Multus: &v1.MultusNetwork{
- NetworkName: fmt.Sprintf("%s/%s", tests.NamespaceTestDefault, "ptp-conf"),
+ NetworkName: fmt.Sprintf("%s/%s", tests.NamespaceTestDefault, "ptp-conf-tuning-1"),
Default: true,
}}},
}
@@ -268,7 +259,7 @@ var _ = Describe("Multus", func() {
Context("VirtualMachineInstance with cni ptp plugin interface with custom MAC address", func() {
- table.DescribeTable("configure valid custom MAC address on ptp interface", func(networkName string) {
+ It("should configure valid custom MAC address on ptp interface when using tuning plugin", func() {
customMacAddress := "50:00:00:00:90:0d"
ptpInterface := v1.Interface{
Name: "ptp",
@@ -280,7 +271,7 @@ var _ = Describe("Multus", func() {
Name: "ptp",
NetworkSource: v1.NetworkSource{
Multus: &v1.MultusNetwork{
- NetworkName: networkName,
+ NetworkName: "ptp-conf-tuning-1",
},
},
}
@@ -314,10 +305,7 @@ var _ = Describe("Multus", func() {
)
Expect(err).ToNot(HaveOccurred())
Expect(strings.Contains(out, customMacAddress)).To(BeFalse())
- },
- table.Entry("when not using tuning plugin", "ptp-conf"),
- table.Entry("when using tuning plugin", "ptp-conf-tuning-1"),
- )
+ })
})
Context("VirtualMachineInstance with Linux bridge plugin interface", func() {
