Skip to content

Commit

Permalink
adress review feedback on tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
  • Loading branch information
bzz committed Nov 22, 2018
1 parent 6709d6a commit ee86a03
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions daemon/protocol/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ type mockedServiceAnyOtherErr struct {
}

func (s *mockedServiceAnyOtherErr) InstallDriver(language string, image string, update bool) error {
var errors errcode.Errors = []error{errors.New("any other error")}
return errors
return errcode.Errors{errors.New("any other error")}
}

func TestServiceMockDaemon_InstallDriverFails(t *testing.T) {
Expand All @@ -42,11 +41,10 @@ type mockedServiceUnauthorizedErr struct {
}

func (s *mockedServiceUnauthorizedErr) InstallDriver(language string, image string, update bool) error {
var errors errcode.Errors = []error{
return errcode.Errors{
errcode.Error{Code: errcode.ErrorCodeDenied},
errcode.Error{Code: errcode.ErrorCodeUnauthorized},
}
return errors
}

func TestServiceMockDaemon_InstallNonexistentDriver(t *testing.T) {
Expand Down

0 comments on commit ee86a03

Please sign in to comment.