Skip to content

Commit

Permalink
Fix networking suite single node
Browse files Browse the repository at this point in the history
  • Loading branch information
sebrandon1 committed Feb 1, 2024
1 parent 66fdf95 commit dcf2da0
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions tests/networking/tests/networking_multus_links.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,28 +391,16 @@ var _ = Describe("Networking custom namespace,", func() {
err = tshelper.DefineAndCreateDaemonsetWithMultusOnCluster(tsparams.TestNadNameB, randomNamespace, "ds5")
Expect(err).ToNot(HaveOccurred())

// Note: We cannot perform the icmpv4 connectivity test on a single node cluster when defining a daemonset.
// Since this is a [negative] test case, we expect it to fail.
expectedState := globalparameters.TestCaseFailed
if globalhelper.GetNumberOfNodes(globalhelper.GetAPIClient().K8sClient.CoreV1()) == 1 {
expectedState = globalparameters.TestCasePassed
}

By("Start tests")
err = globalhelper.LaunchTests(
tsparams.TnfMultusIpv4TcName,
globalhelper.ConvertSpecNameToFileName(CurrentSpecReport().FullText()), randomReportDir, randomTnfConfigDir)

if expectedState == globalparameters.TestCasePassed {
Expect(err).ToNot(HaveOccurred())
} else {
Expect(err).To(HaveOccurred())
}
Expect(err).To(HaveOccurred())

By("Verify test case status in Claim report")
err = globalhelper.ValidateIfReportsAreValid(
tsparams.TnfMultusIpv4TcName,
expectedState, randomReportDir)
globalparameters.TestCaseFailed, randomReportDir)
Expect(err).ToNot(HaveOccurred())
})

Expand Down

0 comments on commit dcf2da0

Please sign in to comment.