Skip to content

Commit

Permalink
fix delete vlan test 🤦🏼‍♀️
Browse files Browse the repository at this point in the history
  • Loading branch information
telyn committed May 9, 2018
1 parent 90c511a commit 4e76cc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cmd/bytemark/commands/admin/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ func TestDeleteVLAN(t *testing.T) {
is := is.New(t)
_, c, app := testutil.BaseTestAuthSetup(t, true, admin.Commands)

c.When("ReapVMs").Return(nil).Times(1)
c.When("DeleteVLAN", 25).Return(nil).Times(1)

err := app.Run([]string{"bytemark", "reap", "servers"})
err := app.Run([]string{"bytemark", "delete", "vlan", "25"})

is.Nil(err)

Expand All @@ -28,9 +28,9 @@ func TestDeleteVLANError(t *testing.T) {
is := is.New(t)
_, c, app := testutil.BaseTestAuthSetup(t, true, admin.Commands)

c.When("ReapVMs").Return(fmt.Errorf("Could not delete VLAN")).Times(1)
c.When("DeleteVLAN", 204).Return(fmt.Errorf("Could not delete VLAN")).Times(1)

err := app.Run([]string{"bytemark", "reap", "servers"})
err := app.Run([]string{"bytemark", "delete", "vlan", "204"})

is.NotNil(err)

Expand Down
2 changes: 1 addition & 1 deletion mocks/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ func (c *Client) ReapVMs() error {
return r.Error(0)
}
func (c *Client) DeleteVLAN(id int) error {
r := c.Called()
r := c.Called(id)
return r.Error(0)
}
func (c *Client) AdminCreateGroup(name lib.GroupName, vlanNum int) error {
Expand Down

0 comments on commit 4e76cc3

Please sign in to comment.