mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Fix definition of ErrSystem type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -179,3 +179,16 @@ func TestUnavailable(t *testing.T) {
|
||||
t.Fatalf("causual should be errTest, got: %v", cause)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSystem(t *testing.T) {
|
||||
if IsSystem(errTest) {
|
||||
t.Fatalf("did not expect system error, got %T", errTest)
|
||||
}
|
||||
e := System(errTest)
|
||||
if !IsSystem(e) {
|
||||
t.Fatalf("expected system error, got %T", e)
|
||||
}
|
||||
if cause := e.(causal).Cause(); cause != errTest {
|
||||
t.Fatalf("causual should be errTest, got: %v", cause)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user