From 2be2c1168085e0234a0cf06dab93b6d763bf3f7d Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Thu, 2 May 2019 22:25:54 -0700 Subject: Linting more (and fixing more) Signed-off-by: Dave Henderson --- data/datasource_http_test.go | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'data/datasource_http_test.go') 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) -- cgit v1.2.3