diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2022-01-09 17:12:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-09 22:12:13 +0000 |
| commit | 155803de7d5c1df5edd456a45a19008c9ae5ea7b (patch) | |
| tree | 7bdc7501e3450ea2a2fafa2521ff0d6a165a1a0e /data/datasource_http_test.go | |
| parent | d03538dcbc6f7d22e02c44269b63ff1d54020ed4 (diff) | |
Propagate context into datasource read functions (#1282)
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'data/datasource_http_test.go')
| -rw-r--r-- | data/datasource_http_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/data/datasource_http_test.go b/data/datasource_http_test.go index 7f8515cc..e2c13a8f 100644 --- a/data/datasource_http_test.go +++ b/data/datasource_http_test.go @@ -1,6 +1,7 @@ package data import ( + "context" "encoding/json" "fmt" "net/http" @@ -57,6 +58,7 @@ func TestHTTPFile(t *testing.T) { hc: client, } data := &Data{ + ctx: context.Background(), Sources: sources, } @@ -94,6 +96,7 @@ func TestHTTPFileWithHeaders(t *testing.T) { }, } data := &Data{ + ctx: context.Background(), Sources: sources, } expected := http.Header{ @@ -110,6 +113,7 @@ func TestHTTPFileWithHeaders(t *testing.T) { "User-Agent": {"Go-http-client/1.1"}, } data = &Data{ + ctx: context.Background(), Sources: sources, extraHeaders: map[string]http.Header{server.URL: expected}, } |
