Skip to content

Commit

Permalink
Unit tests: add logical switch as expected by syncNodes
Browse files Browse the repository at this point in the history
Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
  • Loading branch information
flavio-fernandes committed Jan 31, 2022
1 parent c0be0a3 commit 44d06f5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions go-controller/pkg/ovn/egressgw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2190,6 +2190,10 @@ var _ = ginkgo.Describe("OVN Egress Gateway Operations", func() {
Name: types.GWRouterPrefix + nodeName,
UUID: types.GWRouterPrefix + nodeName + "-UUID",
},
&nbdb.LogicalSwitch{
UUID: "node1",
Name: "node1",
},
},
},
&v1.NamespaceList{
Expand Down Expand Up @@ -2220,6 +2224,10 @@ var _ = ginkgo.Describe("OVN Egress Gateway Operations", func() {
Name: ovntypes.GWRouterToJoinSwitchPrefix + ovntypes.GWRouterPrefix + nodeName,
Networks: []string{"100.64.0.4/32"},
},
&nbdb.LogicalSwitch{
UUID: "node1",
Name: "node1",
},
}
injectNode(fakeOvn)
fakeOvn.controller.WatchNamespaces()
Expand All @@ -2241,6 +2249,10 @@ var _ = ginkgo.Describe("OVN Egress Gateway Operations", func() {
Name: ovntypes.GWRouterToJoinSwitchPrefix + ovntypes.GWRouterPrefix + nodeName,
Networks: []string{"100.64.0.4/32"},
},
&nbdb.LogicalSwitch{
UUID: "node1",
Name: "node1",
},
}
err = deletePerPodGRSNAT(fakeOvn.controller.nbClient, nodeName, extIPs, []*net.IPNet{fullMaskPodNet})
gomega.Expect(err).NotTo(gomega.HaveOccurred())
Expand Down

0 comments on commit 44d06f5

Please sign in to comment.