Skip to content

test: elasticsearch output fails float handling #11119

@powersj

Description

@powersj

Relevant telegraf.conf

n/a

Logs from Telegraf

2022/05/17 13:08:25 I! [] Elasticsearch version: "6.8.23"
2022/05/17 13:08:25 D! [] Template telegraf created or updated
2022/05/17 13:08:25 I! [] Elasticsearch version: "6.8.23"
2022/05/17 13:08:25 D! [] Template telegraf created or updated
2022/05/17 13:08:25 I! [] Elasticsearch version: "6.8.23"
2022/05/17 13:08:25 D! [] Template telegraf created or updated
2022/05/17 13:08:25 I! [] Elasticsearch version: "6.8.23"
2022/05/17 13:08:25 D! [] Template telegraf created or updated
--- FAIL: TestConnectAndWriteMetricWithNaNValueReplacement (0.00s)
    elasticsearch_test.go:185: 
        	Error Trace:	elasticsearch_test.go:185
        	Error:      	Received unexpected error:
        	            	invalid float_handling type "3.1415"
        	Test:       	TestConnectAndWriteMetricWithNaNValueReplacement
2022/05/17 13:08:25 D! [] Disabling health check
2022/05/17 13:08:25 I! [] Elasticsearch version: "6.8.23"
2022/05/17 13:08:25 D! [] Template telegraf created or updated
2022/05/17 13:08:25 D! [] Template telegraf created or updated
2022/05/17 13:08:25 D! [] Disabling health check
2022/05/17 13:08:25 I! [] Elasticsearch version: "6.8.23"
2022/05/17 13:08:25 D! [] Tag 'tag3' not found, using 'none' on index name instead
2022/05/17 13:08:25 D! [] Tag es-pipeline not found, reverting to default pipeline instead.
2022/05/17 13:08:25 D! [] Tag es-pipeline not found, reverting to default pipeline instead.
2022/05/17 13:08:25 D! [] Tag es-pipeline not found, reverting to default pipeline instead.
2022/05/17 13:08:25 D! [] Disabling health check
2022/05/17 13:08:25 I! [] Elasticsearch version: "7.8"
2022/05/17 13:08:25 D! [] Tag 'host' not found, using '' on index name instead
2022/05/17 13:08:25 D! [] Disabling health check
2022/05/17 13:08:25 I! [] Elasticsearch version: "7.8"
2022/05/17 13:08:25 D! [] Tag 'host' not found, using '' on index name instead
2022/05/17 13:08:25 D! [] Disabling health check
2022/05/17 13:08:25 I! [] Elasticsearch version: "7.8"
2022/05/17 13:08:25 D! [] Tag 'host' not found, using '' on index name instead
FAIL
FAIL	github.com/influxdata/telegraf/plugins/outputs/elasticsearch	0.359s
FAIL

System info

master

Docker

No response

Steps to reproduce

  1. docker-compose up
  2. go test -count=1 -race -timeout 30s ./plugins/outputs/elasticsearch/...

Expected behavior

tests pass

Actual behavior

It appears that this integration test did not have the correct float_handling type. It is one of three values, not some random float value. The current test is only setup to test the none option as well.

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions