Log error if scheme is unsupported
This commit is contained in:
@@ -46,6 +46,17 @@ func TestHTTP_MinimalConfig(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestHTTP_UnsupportedScheme(t *testing.T) {
|
||||
config := &influxdb.HTTPConfig{
|
||||
URL: &url.URL{
|
||||
Scheme: "foo",
|
||||
Host: "localhost",
|
||||
},
|
||||
}
|
||||
_, err := influxdb.NewHTTPClient(config)
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
func TestHTTP_CreateDatabase(t *testing.T) {
|
||||
ts := httptest.NewServer(http.NotFoundHandler())
|
||||
defer ts.Close()
|
||||
@@ -576,9 +587,6 @@ func TestHTTP_UnixSocket(t *testing.T) {
|
||||
ts.Start()
|
||||
defer ts.Close()
|
||||
|
||||
x, _ := url.Parse("unix://" + sock)
|
||||
fmt.Println(x)
|
||||
|
||||
successResponse := []byte(`{"results": [{"statement_id": 0}]}`)
|
||||
|
||||
tests := []struct {
|
||||
|
||||
Reference in New Issue
Block a user