Add tests simulating an evil server

Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
This commit is contained in:
Nathan McCauley
2015-07-24 16:31:18 -07:00
committed by Derek McGowan
parent 871d2b96ed
commit 268fa5af47
5 changed files with 232 additions and 13 deletions
-11
View File
@@ -1267,17 +1267,6 @@ func setupNotary(c *check.C) *testNotary {
c.Fatal(err)
}
// Wait for notary to be ready to serve requests.
for i := 1; i <= 5; i++ {
if err = ts.Ping(); err == nil {
break
}
time.Sleep(10 * time.Millisecond * time.Duration(i*i))
}
if err != nil {
c.Fatalf("Timeout waiting for test notary to become available: %s", err)
}
return ts
}