mqtt_cpp icon indicating copy to clipboard operation
mqtt_cpp copied to clipboard

Integration tests against other MQTT protocol implementations?

Open jonesmz opened this issue 5 years ago • 4 comments

Have you considered adding integration tests on continuous integration (travis CI, etc) that has mqtt_cpp connect with other implementations like mosquitto?

jonesmz avatar Sep 07 '19 02:09 jonesmz

Yes. The earlier version of mqtt_cpp use test.mosquitto.org for test. I added UUID prefix to topic and client id to avoid conflict. However, test.mosquitto.org is not good for CI. It is unstable and continuous connection could regard to an attack.

At that time, I implemented endpoint and test_broker. So I switched my own server. I know that if the common part such as endpoint has a bug, it might not be found. But I compromised.

We can run mosquitto on CI environment instead of using test.moqsuitto.org. But I don't have strong motivation to do that.

It is the current situation.

redboltz avatar Sep 08 '19 07:09 redboltz

My suggestion in this case was to install mosquito server inside the ci environment. And run it locally.

jonesmz avatar Sep 08 '19 22:09 jonesmz

My suggestion in this case was to install mosquito server inside the ci environment. And run it locally.

Yes. That is I mentioned "We can run mosquitto on CI environment instead of using test.moqsuitto.org. ".

Now, the test server location is set by https://github.com/redboltz/mqtt_cpp/blob/master/test/test_settings.hpp#L18

And I noticed that mosquitto cert file is already included https://github.com/redboltz/mqtt_cpp/tree/master/test/certs

redboltz avatar Sep 09 '19 00:09 redboltz

Ah. I read poorly because I was using my phone, instead of a real computer.

Thank you for clarifying.

jonesmz avatar Sep 09 '19 08:09 jonesmz