It("sets a neighbor entry in the sandbox namespace", func() { ns.ExecuteStub = func(callback func(ns *os.File) error) error { Expect(netlinker.SetNeighCallCount()).To(Equal(0)) callback(nil) if ns.ExecuteCallCount() == 2 { Expect(netlinker.SetNeighCallCount()).To(Equal(2)) } return nil } inserter.HandleResolvedNeighbors(ready, ns, "some-vxlan-name", resolved) Eventually(ready).Should(BeClosed()) Expect(ns.ExecuteCallCount()).To(Equal(2)) Expect(netlinker.SetNeighArgsForCall(0)).To(Equal(&netlink.Neigh{ LinkIndex: neigh.LinkIndex, Family: neigh.Family, State: netlink.NUD_REACHABLE, Type: neigh.Type, Flags: neigh.Flags, IP: neigh.IP, HardwareAddr: neigh.HardwareAddr, })) }) It("sets a forwarding database entry in the the namespace", func() { ns.ExecuteStub = func(callback func(_ *os.File) error) error { Expect(netlinker.SetNeighCallCount()).To(Equal(0)) callback(nil) if ns.ExecuteCallCount() == 2 {