Skip to content

Commit

Permalink
Add info field to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gfr10598 committed May 22, 2019
1 parent 5240af0 commit 9f83cb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/v2/api-v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ func TestDoRequest(t *testing.T) {
ips := []string{"8.8.8.8", "147.1.2.3"}
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
resp, err := api.GetAnnotations(ctx, url, time.Now(), ips)
resp, err := api.GetAnnotations(ctx, url, time.Now(), ips, "reqInfo")
if err == nil {
t.Fatal("Should have timed out")
}
ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
resp, err = api.GetAnnotations(ctx, url, time.Now(), ips)
resp, err = api.GetAnnotations(ctx, url, time.Now(), ips, "reqInfo")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -79,7 +79,7 @@ func TestSomeErrors(t *testing.T) {
ips := []string{"8.8.8.8", "147.1.2.3"}
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
_, err := api.GetAnnotations(ctx, url, time.Now(), ips)
_, err := api.GetAnnotations(ctx, url, time.Now(), ips, "reqInfo")
if callCount != 1 {
t.Error("Should have been two calls to server.")
}
Expand Down

0 comments on commit 9f83cb3

Please sign in to comment.