Skip to content

Commit

Permalink
Merged in phstsai/fix-entity-bugs (pull request #9)
Browse files Browse the repository at this point in the history
fix the bug of unit test

Approved-by: Hung-Wei Chiu <[email protected]>
  • Loading branch information
WakeupTsai authored and hwchiu committed Jun 15, 2018
2 parents 4489f61 + 249424c commit 4dde091
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/server/handler_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,16 +397,18 @@ func TestGetNetwork(t *testing.T) {
cf := config.MustRead("../../config/testing.json")
sp := serviceprovider.New(cf)

eth1 := entity.PhysicalPort{
Name: "eth1",
MTU: 1500,
VlanTags: []int{2043, 2143, 2243},
}
network := entity.Network{
DisplayName: "OVS Bridge",
BridgeName: "obsbr1",
BridgeType: "ovs",
Node: "node1",
Interface: "eth3",
Ports: []int32{2043, 2143, 2243},
MTU: 1500,
DisplayName: "OVS Bridge",
BridgeName: "obsbr1",
BridgeType: "ovs",
Node: "node1",
PhysicalPorts: []entity.PhysicalPort{eth1},
}

session := sp.Mongo.NewSession()
defer session.RemoveAll(entity.NetworkCollectionName)

Expand Down

0 comments on commit 4dde091

Please sign in to comment.