Skip to content

Commit

Permalink
netstat, test: Validate that the volatile cache is populated
Browse files Browse the repository at this point in the history
The volatile cache needs to be populated based on the non-volatile
cache.

Signed-off-by: Edward Haas <edwardh@redhat.com>
  • Loading branch information
EdDev committed Dec 21, 2021
1 parent 025d75e commit f5bed9b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkg/network/setup/netstat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,24 @@ var _ = Describe("netstat", func() {
Expect(setup.NetStat.UpdateStatus(setup.Vmi, nil)).To(Succeed())
})

It("volatile cache is updated based on non-volotile cache", func() {
const (
primaryNetworkName = "primary"
primaryPodIPv4 = "1.1.1.1"
)

setup.addNetworkInterface(
newVMISpecIfaceWithBridgeBinding(primaryNetworkName),
newVMISpecPodNetwork(primaryNetworkName),
newDomainSpecIface(primaryNetworkName, ""),
primaryPodIPv4,
)

setup.NetStat.UpdateStatus(setup.Vmi, setup.Domain)

Expect(setup.NetStat.PodInterfaceVolatileDataIsCached(setup.Vmi, primaryNetworkName)).To(BeTrue())
})

Context("with volatile cache", func() {
const (
primaryNetworkName = "primary"
Expand Down

0 comments on commit f5bed9b

Please sign in to comment.