Add headers parameter for HTTP checker
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
e8f088fea6
commit
b67aab2f60
5 changed files with 36 additions and 6 deletions
|
@ -15,11 +15,11 @@ func TestFileChecker(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestHTTPChecker(t *testing.T) {
|
||||
if err := HTTPChecker("https://www.google.cybertron", 200, 0).Check(); err == nil {
|
||||
if err := HTTPChecker("https://www.google.cybertron", 200, 0, nil).Check(); err == nil {
|
||||
t.Errorf("Google on Cybertron was expected as not exists")
|
||||
}
|
||||
|
||||
if err := HTTPChecker("https://www.google.pt", 200, 0).Check(); err != nil {
|
||||
if err := HTTPChecker("https://www.google.pt", 200, 0, nil).Check(); err != nil {
|
||||
t.Errorf("Google at Portugal was expected as exists, error:%v", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue