Contribute plugin - telegraf

In the it’s said to run make docker-run before running integration tests. The command doesn’t work and I also can’t find docker-run in the makefile.
Am I missing something?
Thank you

Hi @IdoH,

Apologies about this, this is a mistake. The target mentioned in the CONTRIBUTION guidelines was renamed to docker-image

Thank you. I still keep getting failed tests whenever a tcp connection is required (“FAILED to send NSQD message: dial tcp [::1]:4150: connect: connection refused”), is it something you encountered?
Should I run the docker in a certain way after building the image?


I spoke to the Telegraf team and the target was renamed docker-image, but it’s not for running tests.

Instead, they suggest running docker-compose up instead

I tried your suggestion and docker-compose up keeps failing with the following error:
ERROR: for crate Cannot start service crate: driver failed programming external connectivity on endpoint telegraf_crate_1 (9df7efdeb96bed97f734f20b15a0178e0ae80cff7df78e4d007f9e51fc6a7652): Bind for failed: port is already allocated

After looking at the docker-compose.yml it seems like postgres and crate are using the same port (5432). I was able to fix it by disable the port binding in the postgres section.
I’m not sure this is the right way to handle it, can you suggest what to do to solve this issue?

In addition, tests are still failing even after I fixed the docker-compose with the above

You are correct about the port conflict, I will raise a bug!

After commenting out crate, I am able to run docker-compose up and wait a few minutes and then run make tests-all and the NSQ tests are fine:

|ok  || 0.034s|
|ok  || 30.067s|

Have you modified this plugin at all?

Thank you for the PR.
I still can’t make the tests pass. I tried with the docker-compose in your PR and with commenting out crate section. Keep getting the same errors. Didn’t changed any plugin other than adding my own output plugin. I added the log for the make test-all runtests_log.txt (39.4 KB)

If you didn’t change the code and the tests are failing, I’d ignore them for now, If you’re submitting a PR with a new plugin, the tests will run there too :+1:

Ok, thank you for the help :grinning: