mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fatal() doesn't take a format string like Fatalf()
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
This commit is contained in:
parent
ad19f1beb7
commit
00469957ad
1 changed files with 6 additions and 6 deletions
|
@ -25,26 +25,26 @@ func TestParseLxcConfOpt(t *testing.T) {
|
|||
|
||||
func TestNetHostname(t *testing.T) {
|
||||
if _, _, _, err := Parse([]string{"-h=name", "img", "cmd"}, nil); err != nil {
|
||||
t.Fatal("Unexpected error: %s", err)
|
||||
t.Fatalf("Unexpected error: %s", err)
|
||||
}
|
||||
|
||||
if _, _, _, err := Parse([]string{"--net=host", "img", "cmd"}, nil); err != nil {
|
||||
t.Fatal("Unexpected error: %s", err)
|
||||
t.Fatalf("Unexpected error: %s", err)
|
||||
}
|
||||
|
||||
if _, _, _, err := Parse([]string{"-h=name", "--net=bridge", "img", "cmd"}, nil); err != nil {
|
||||
t.Fatal("Unexpected error: %s", err)
|
||||
t.Fatalf("Unexpected error: %s", err)
|
||||
}
|
||||
|
||||
if _, _, _, err := Parse([]string{"-h=name", "--net=none", "img", "cmd"}, nil); err != nil {
|
||||
t.Fatal("Unexpected error: %s", err)
|
||||
t.Fatalf("Unexpected error: %s", err)
|
||||
}
|
||||
|
||||
if _, _, _, err := Parse([]string{"-h=name", "--net=host", "img", "cmd"}, nil); err != ErrConflictNetworkHostname {
|
||||
t.Fatal("Expected error ErrConflictNetworkHostname, got: %s", err)
|
||||
t.Fatalf("Expected error ErrConflictNetworkHostname, got: %s", err)
|
||||
}
|
||||
|
||||
if _, _, _, err := Parse([]string{"-h=name", "--net=container:other", "img", "cmd"}, nil); err != ErrConflictNetworkHostname {
|
||||
t.Fatal("Expected error ErrConflictNetworkHostname, got: %s", err)
|
||||
t.Fatalf("Expected error ErrConflictNetworkHostname, got: %s", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue