Update tests to check returned errors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2018-12-31 18:22:43 +01:00
parent 77c5668baf
commit 161e0a90a6
81 changed files with 359 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/docker/docker/api/types"
volumetypes "github.com/docker/docker/api/types/volume"
"github.com/docker/docker/errdefs"
)
func TestVolumeCreateError(t *testing.T) {
@@ -23,6 +24,9 @@ func TestVolumeCreateError(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 TestVolumeCreate(t *testing.T) {