diff --git a/tests/cnf/core/network/dpdk/tests/rootless.go b/tests/cnf/core/network/dpdk/tests/rootless.go index a276fc085..2ff853ddd 100644 --- a/tests/cnf/core/network/dpdk/tests/rootless.go +++ b/tests/cnf/core/network/dpdk/tests/rootless.go @@ -24,6 +24,7 @@ import ( "github.com/openshift-kni/eco-gotests/tests/cnf/core/network/internal/define" "github.com/openshift-kni/eco-gotests/tests/cnf/core/network/internal/netenv" . "github.com/openshift-kni/eco-gotests/tests/cnf/core/network/internal/netinittools" + "github.com/openshift-kni/eco-gotests/tests/cnf/core/network/internal/netparam" "github.com/openshift-kni/eco-gotests/tests/internal/cluster" "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types" corev1 "k8s.io/api/core/v1" @@ -652,7 +653,7 @@ func defineAndCreateVlanNad(name, intName string, vlanID uint16, ipam *nad.IPAM) func defineAndCreateSrIovNetwork(srIovNetwork, resName string, vlanID uint16) { srIovNetworkObject := sriov.NewNetworkBuilder( APIClient, srIovNetwork, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, resName). - WithMacAddressSupport() + WithMacAddressSupport().WithLogLevel(netparam.LogLevelDebug) if vlanID != 0 { srIovNetworkObject.WithVLAN(vlanID) diff --git a/tests/cnf/core/network/internal/netparam/const.go b/tests/cnf/core/network/internal/netparam/const.go index 227337d2b..364d7cb0f 100644 --- a/tests/cnf/core/network/internal/netparam/const.go +++ b/tests/cnf/core/network/internal/netparam/const.go @@ -19,4 +19,6 @@ const ( IPSubnet64 = "64" // IPSubnet32 represents prefix 32 ipv4 subnet. IPSubnet32 = "32" + // LogLevelDebug represents log level debug. + LogLevelDebug = "debug" ) diff --git a/tests/cnf/core/network/policy/tests/multinetpolicysriov.go b/tests/cnf/core/network/policy/tests/multinetpolicysriov.go index b47886fb7..1e883e6ee 100644 --- a/tests/cnf/core/network/policy/tests/multinetpolicysriov.go +++ b/tests/cnf/core/network/policy/tests/multinetpolicysriov.go @@ -18,6 +18,7 @@ import ( "github.com/openshift-kni/eco-gotests/tests/cnf/core/network/internal/ipaddr" "github.com/openshift-kni/eco-gotests/tests/cnf/core/network/internal/netenv" . "github.com/openshift-kni/eco-gotests/tests/cnf/core/network/internal/netinittools" + "github.com/openshift-kni/eco-gotests/tests/cnf/core/network/internal/netparam" "github.com/openshift-kni/eco-gotests/tests/cnf/core/network/policy/internal/tsparams" "github.com/openshift-kni/eco-gotests/tests/internal/cluster" corev1 "k8s.io/api/core/v1" @@ -84,7 +85,7 @@ var _ = Describe("SRIOV", Ordered, Label("multinetworkpolicy"), ContinueOnFailur NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, sriovPolicy.Definition.Spec.ResourceName). - WithStaticIpam().Create() + WithStaticIpam().WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), "Failed to configure sr-iov network") By("Waiting until cluster MCP and SR-IOV are stable") diff --git a/tests/cnf/core/network/sriov/tests/allmulti.go b/tests/cnf/core/network/sriov/tests/allmulti.go index 50531e388..0fec883e8 100644 --- a/tests/cnf/core/network/sriov/tests/allmulti.go +++ b/tests/cnf/core/network/sriov/tests/allmulti.go @@ -320,7 +320,7 @@ var _ = Describe("allmulti", Ordered, Label(tsparams.LabelSuite), ContinueOnFail func defineAndCreateSrIovNetwork(srIovNetwork, resName string, allMulti bool) { srIovNetworkObject := sriov.NewNetworkBuilder( APIClient, srIovNetwork, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, resName). - WithStaticIpam().WithIPAddressSupport().WithMacAddressSupport() + WithStaticIpam().WithIPAddressSupport().WithMacAddressSupport().WithLogLevel(netparam.LogLevelDebug) if allMulti { srIovNetworkObject.WithTrustFlag(true).WithMetaPluginAllMultiFlag(true) @@ -477,7 +477,7 @@ func defineBondNAD(nadname, mode string) *nad.Builder { func defineAndCreateSrIovNetworkWithOutIPAM(srIovNetwork string, allMulti bool) { srIovNetworkObject := sriov.NewNetworkBuilder( APIClient, srIovNetwork, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, - srIovPolicyNode0ResName).WithMacAddressSupport() + srIovPolicyNode0ResName).WithMacAddressSupport().WithLogLevel(netparam.LogLevelDebug) if allMulti { srIovNetworkObject.WithTrustFlag(true).WithMetaPluginAllMultiFlag(true) diff --git a/tests/cnf/core/network/sriov/tests/exposemtu.go b/tests/cnf/core/network/sriov/tests/exposemtu.go index 5c3ea7da2..4d9ca08b2 100644 --- a/tests/cnf/core/network/sriov/tests/exposemtu.go +++ b/tests/cnf/core/network/sriov/tests/exposemtu.go @@ -109,12 +109,12 @@ var _ = Describe("SRIOV: Expose MTU:", Ordered, Label(tsparams.LabelExposeMTUTes By("Creating 2 SR-IOV networks") _, err = sriov.NewNetworkBuilder(APIClient, sriovAndResourceName5000, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, sriovAndResourceName5000).WithStaticIpam().WithMacAddressSupport(). - WithIPAddressSupport().Create() + WithIPAddressSupport().WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), "Failed to create SR-IOV network for the policy with 5000 MTU") _, err = sriov.NewNetworkBuilder(APIClient, sriovAndResourceName9000, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, sriovAndResourceName9000).WithStaticIpam().WithMacAddressSupport(). - WithIPAddressSupport().Create() + WithIPAddressSupport().WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), "Failed to create SR-IOV network for the policy with 9000 MTU") By("Creating 2 pods with different VFs") @@ -171,7 +171,7 @@ func testExposeMTU(mtu int, interfacesUnderTest []string, devType, workerName st _, err = sriov.NewNetworkBuilder(APIClient, sriovAndResourceNameExposeMTU, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, sriovAndResourceNameExposeMTU).WithStaticIpam().WithMacAddressSupport(). - WithIPAddressSupport().Create() + WithIPAddressSupport().WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), "Failed to create SR-IOV network") By("Creating test pod") diff --git a/tests/cnf/core/network/sriov/tests/externalllymanaged.go b/tests/cnf/core/network/sriov/tests/externalllymanaged.go index a27954cf5..6eff29fcd 100644 --- a/tests/cnf/core/network/sriov/tests/externalllymanaged.go +++ b/tests/cnf/core/network/sriov/tests/externalllymanaged.go @@ -385,7 +385,8 @@ var _ = Describe("ExternallyManaged", Ordered, Label(tsparams.LabelExternallyMan _, err = sriov.NewNetworkBuilder( APIClient, sriovAndResourceNameExManagedTrue, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, sriovAndResourceNameExManagedTrue). - WithStaticIpam().WithMacAddressSupport().WithIPAddressSupport().WithVLAN(uint16(testVlan)).Create() + WithStaticIpam().WithMacAddressSupport().WithIPAddressSupport().WithVLAN(uint16(testVlan)). + WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), "Failed to create SR-IOV network") By("Creating test pods and checking connectivity between test pods") @@ -410,7 +411,8 @@ func createSriovConfiguration(sriovAndResName, sriovInterfaceName string, extern By("Creating SR-IOV network") _, err = sriov.NewNetworkBuilder(APIClient, sriovAndResName, NetConfig.SriovOperatorNamespace, - tsparams.TestNamespaceName, sriovAndResName).WithStaticIpam().WithMacAddressSupport().WithIPAddressSupport().Create() + tsparams.TestNamespaceName, sriovAndResName).WithStaticIpam().WithMacAddressSupport().WithIPAddressSupport(). + WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), "Failed to create SR-IOV network") } diff --git a/tests/cnf/core/network/sriov/tests/paralleldraining.go b/tests/cnf/core/network/sriov/tests/paralleldraining.go index f82b0fc4c..f28a80e31 100644 --- a/tests/cnf/core/network/sriov/tests/paralleldraining.go +++ b/tests/cnf/core/network/sriov/tests/paralleldraining.go @@ -248,7 +248,7 @@ func createSriovConfigurationParallelDrain(sriovInterfaceName string) { _, err = sriov.NewNetworkBuilder(APIClient, sriovAndResourceNameParallelDrain, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, sriovAndResourceNameParallelDrain).WithStaticIpam().WithMacAddressSupport(). - WithIPAddressSupport().Create() + WithIPAddressSupport().WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), "Failed to create SR-IOV network") } diff --git a/tests/cnf/core/network/sriov/tests/qinq.go b/tests/cnf/core/network/sriov/tests/qinq.go index cd837c528..58807f552 100644 --- a/tests/cnf/core/network/sriov/tests/qinq.go +++ b/tests/cnf/core/network/sriov/tests/qinq.go @@ -371,7 +371,7 @@ var _ = Describe("QinQ", Ordered, Label(tsparams.LabelQinQTestCases), ContinueOn By("Define and create sriov-network for the promiscuous client") _, err = sriov.NewNetworkBuilder(APIClient, srIovNetworkPromiscuous, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, - srIovPolicyResNameNetDevice).WithTrustFlag(true).Create() + srIovPolicyResNameNetDevice).WithTrustFlag(true).WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), "Failed to create sriov network srIovNetworkPromiscuous") By("Define and create sriov-network with 802.1q S-VLAN") @@ -698,7 +698,7 @@ func defineAndCreateSrIovNetworkWithQinQ(srIovNetwork, resName, vlanProtocol str srIovNetworkObject, err := sriov.NewNetworkBuilder( APIClient, srIovNetwork, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, resName). - WithVlanProto(vlanProtocol).WithVLAN(uint16(vlan)).Create() + WithVlanProto(vlanProtocol).WithVLAN(uint16(vlan)).WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("Failed to create sriov network %s", err)) Eventually(func() bool { @@ -711,7 +711,8 @@ func defineAndCreateSrIovNetworkWithQinQ(srIovNetwork, resName, vlanProtocol str func defineAndCreateSrIovNetworkClientDPDK(srIovNetworkName, resName string) { srIovNetworkObject, err := sriov.NewNetworkBuilder( - APIClient, srIovNetworkName, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, resName).Create() + APIClient, srIovNetworkName, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, resName). + WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), "Failed to create dpdk sriov-network") Eventually(func() bool { @@ -1064,7 +1065,7 @@ func defineAndCreateSriovNetworks(sriovNetworkPromiscName, sriovNetworkDot1ADNam _, err := sriov.NewNetworkBuilder(APIClient, sriovNetworkPromiscName, NetConfig.SriovOperatorNamespace, tsparams.TestNamespaceName, - sriovResName).WithTrustFlag(true).Create() + sriovResName).WithTrustFlag(true).WithLogLevel(netparam.LogLevelDebug).Create() Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("Failed to create sriov network srIovNetworkPromiscuous %s", err))