Skip to content

Commit

Permalink
test(net): handle error message for test case
Browse files Browse the repository at this point in the history
  • Loading branch information
cad committed Apr 4, 2021
1 parent a7cc149 commit c8b8f21
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions net_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,18 @@ func TestNetGetAssociatedUsers(t *testing.T) {
cidrStr := "192.168.1.0/24"
netType := SERVERNET
userName := "testUser2"
user, _ := CreateNewUser(userName, "123", false, 0, true, "description")
user, err := CreateNewUser(userName, "123", false, 0, true, "description")
if err != nil {
t.Fatal(err)
}

n, _ := CreateNewNetwork(netName, cidrStr, netType, "")
n.Associate(user.Username)
n, err := CreateNewNetwork(netName, cidrStr, netType, "")
if err != nil {
t.Fatal(err)
}
if err := n.Associate(user.Username); err != nil {
t.Fatal(err)
}
n = nil
n, _ = GetNetwork(netName)

Expand Down

0 comments on commit c8b8f21

Please sign in to comment.