Skip to content

Commit

Permalink
Revert "update influxdb v2 port"
Browse files Browse the repository at this point in the history
This reverts commit 8c3ba65.
  • Loading branch information
ssoroka committed Sep 9, 2020
1 parent 8c3ba65 commit 8cd0fe5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion plugins/outputs/influxdb_v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The InfluxDB output plugin writes metrics to the [InfluxDB v2.x] HTTP service.
## Multiple URLs can be specified for a single cluster, only ONE of the
## urls will be written to each interval.
## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
urls = ["http://127.0.0.1:8086"]
urls = ["http://127.0.0.1:9999"]

## Token for authentication.
token = ""
Expand Down
6 changes: 3 additions & 3 deletions plugins/outputs/influxdb_v2/http_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ func TestMakeWriteURL(t *testing.T) {
act string
}{
{
url: genURL("http://localhost:8086"),
act: "http://localhost:8086/api/v2/write?bucket=telegraf&org=influx",
url: genURL("http://localhost:9999"),
act: "http://localhost:9999/api/v2/write?bucket=telegraf&org=influx",
},
{
url: genURL("unix://var/run/influxd.sock"),
act: "http://127.0.0.1/api/v2/write?bucket=telegraf&org=influx",
},
{
err: true,
url: genURL("udp://localhost:8086"),
url: genURL("udp://localhost:9999"),
},
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/outputs/influxdb_v2/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestNewHTTPClient(t *testing.T) {
{
err: true,
cfg: &influxdb.HTTPConfig{
URL: genURL("udp://localhost:8086"),
URL: genURL("udp://localhost:9999"),
},
},
{
Expand Down
4 changes: 2 additions & 2 deletions plugins/outputs/influxdb_v2/influxdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

var (
defaultURL = "http://localhost:8086"
defaultURL = "http://localhost:9999"

ErrMissingURL = errors.New("missing URL")
)
Expand All @@ -28,7 +28,7 @@ var sampleConfig = `
## Multiple URLs can be specified for a single cluster, only ONE of the
## urls will be written to each interval.
## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
urls = ["http://127.0.0.1:8086"]
urls = ["http://127.0.0.1:9999"]
## Token for authentication.
token = ""
Expand Down
10 changes: 5 additions & 5 deletions plugins/outputs/influxdb_v2/influxdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestDefaultURL(t *testing.T) {
if len(output.URLs) < 1 {
t.Fatal("Default URL failed to get set")
}
require.Equal(t, "http://localhost:8086", output.URLs[0])
require.Equal(t, "http://localhost:9999", output.URLs[0])
}
func TestConnect(t *testing.T) {
tests := []struct {
Expand All @@ -26,7 +26,7 @@ func TestConnect(t *testing.T) {
{
out: influxdb.InfluxDB{
URLs: []string{"http://localhost:1234"},
HTTPProxy: "http://localhost:8086",
HTTPProxy: "http://localhost:9999",
HTTPHeaders: map[string]string{
"x": "y",
},
Expand All @@ -36,7 +36,7 @@ func TestConnect(t *testing.T) {
err: true,
out: influxdb.InfluxDB{
URLs: []string{"!@#$qwert"},
HTTPProxy: "http://localhost:8086",
HTTPProxy: "http://localhost:9999",
HTTPHeaders: map[string]string{
"x": "y",
},
Expand All @@ -56,7 +56,7 @@ func TestConnect(t *testing.T) {
err: true,
out: influxdb.InfluxDB{
URLs: []string{"!@#$%^&*()_+"},
HTTPProxy: "http://localhost:8086",
HTTPProxy: "http://localhost:9999",
HTTPHeaders: map[string]string{
"x": "y",
},
Expand All @@ -66,7 +66,7 @@ func TestConnect(t *testing.T) {
err: true,
out: influxdb.InfluxDB{
URLs: []string{":::@#$qwert"},
HTTPProxy: "http://localhost:8086",
HTTPProxy: "http://localhost:9999",
HTTPHeaders: map[string]string{
"x": "y",
},
Expand Down

0 comments on commit 8cd0fe5

Please sign in to comment.