diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2019-05-02 22:25:54 -0700 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2019-05-02 22:28:30 -0700 |
| commit | 2be2c1168085e0234a0cf06dab93b6d763bf3f7d (patch) | |
| tree | 8debeb071f9f246785817c97480edceaba1f4cd5 /data/datasource_http_test.go | |
| parent | b65e14e1fda1c005a07ec9b98e746ce3d699521a (diff) | |
Linting more (and fixing more)
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'data/datasource_http_test.go')
| -rw-r--r-- | data/datasource_http_test.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/data/datasource_http_test.go b/data/datasource_http_test.go index 62531241..f35733db 100644 --- a/data/datasource_http_test.go +++ b/data/datasource_http_test.go @@ -162,37 +162,6 @@ func TestParseHeaderArgs(t *testing.T) { assert.Equal(t, expected, parsed) } -func TestHTTPFileWithSubPath(t *testing.T) { - server, client := setupHTTP(200, "application/json; charset=utf-8", `{"hello": "world"}`) - defer server.Close() - - sources := make(map[string]*Source) - sources["foo"] = &Source{ - Alias: "foo", - URL: &url.URL{ - Scheme: "http", - Host: "example.com", - Path: "/foo", - }, - hc: client, - } - data := &Data{ - Sources: sources, - } - - expected := map[string]interface{}{ - "hello": "world", - } - - actual, err := data.Datasource("foo") - assert.NoError(t, err) - assert.Equal(t, must(marshalObj(expected, json.Marshal)), must(marshalObj(actual, json.Marshal))) - - actual, err = data.Datasource(server.URL) - assert.NoError(t, err) - assert.Equal(t, must(marshalObj(expected, json.Marshal)), must(marshalObj(actual, json.Marshal))) -} - func TestBuildURL(t *testing.T) { expected := "https://example.com/index.html" base := mustParseURL(expected) |
