mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update tests to check returned errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
77c5668baf
commit
161e0a90a6
81 changed files with 359 additions and 2 deletions
|
@ -13,6 +13,7 @@ import (
|
|||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/filters"
|
||||
"github.com/docker/docker/api/types/swarm"
|
||||
"github.com/docker/docker/errdefs"
|
||||
)
|
||||
|
||||
func TestNodeListError(t *testing.T) {
|
||||
|
@ -24,6 +25,9 @@ func TestNodeListError(t *testing.T) {
|
|||
if err == nil || err.Error() != "Error response from daemon: Server error" {
|
||||
t.Fatalf("expected a Server Error, got %v", err)
|
||||
}
|
||||
if !errdefs.IsSystem(err) {
|
||||
t.Fatalf("expected a Server Error, got %T", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestNodeList(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue