diff --git a/plugins/inputs/firehose/testcases/common-attributes/body.json b/plugins/inputs/firehose/testcases/common-attributes/body.json new file mode 100644 index 0000000000000..b6a0a8e727e7b --- /dev/null +++ b/plugins/inputs/firehose/testcases/common-attributes/body.json @@ -0,0 +1,5 @@ +{ + "requestId": "telegraf-test-id", + "timestamp":1734625715000000000, + "records":[{"data":"dGVzdCB2YWx1ZT00MmkgMTczNDYyNTcxNTAwMDAwMDAwMAo="}] +} \ No newline at end of file diff --git a/plugins/inputs/firehose/testcases/common-attributes/expected.out b/plugins/inputs/firehose/testcases/common-attributes/expected.out new file mode 100644 index 0000000000000..c538502d18dfa --- /dev/null +++ b/plugins/inputs/firehose/testcases/common-attributes/expected.out @@ -0,0 +1 @@ +test,device=pc,deployment=prod,path=/telegraf value=42i 1734625715000000000 diff --git a/plugins/inputs/firehose/testcases/common-attributes/headers.json b/plugins/inputs/firehose/testcases/common-attributes/headers.json new file mode 100644 index 0000000000000..231121dfe9c3d --- /dev/null +++ b/plugins/inputs/firehose/testcases/common-attributes/headers.json @@ -0,0 +1,5 @@ +{ + "x-amz-firehose-request-id": "telegraf-test-id", + "x-amz-firehose-access-key": "secret", + "x-amz-firehose-common-attributes": "{\"commonAttributes\": {\"deployment\": \"prod\", \"device\": \"pc\"}}" +} \ No newline at end of file diff --git a/plugins/inputs/firehose/testcases/common-attributes/telegraf.conf b/plugins/inputs/firehose/testcases/common-attributes/telegraf.conf new file mode 100644 index 0000000000000..ac01f158584c7 --- /dev/null +++ b/plugins/inputs/firehose/testcases/common-attributes/telegraf.conf @@ -0,0 +1,4 @@ +[[inputs.firehose]] + service_address = "dummy" + access_key = "secret" + parameter_tags = ["deployment", "device"]