carbon-relay-ng icon indicating copy to clipboard operation
carbon-relay-ng copied to clipboard

[WIP] bring up docker env in unit test

Open replay opened this issue 6 years ago • 1 comments

Current status: I have a local amqp server running in a docker container, using the public rabbitmq image. I'm trying to make go test -race github.com/graphite-ng/carbon-relay-ng/input -test.v -run TestAmqpConsumeRabbit connect to it, but I can't get it to succeed because the topic exchange doesn't exist and I can't find a way to create it with rabbitmqctl. I think if the unit test would connect to rabbitmq, then it could declare the topic exchange, and then the amqp input should succeed to connect on the next reconnect. So I think the next step should be to make the unit test connect and declare that exchange, and then verify that this way the input can connect successfully.

Side Note: by default the rabbitmq image user the user guest with password guest for the virtualhost /. Alternatively users / vhosts can be created with these env vars:

RABBITMQ_DEFAULT_VHOST=vhost
RABBITMQ_DEFAULT_USER=test_user
RABBITMQ_DEFAULT_PASS=test_password

replay avatar Oct 05 '18 19:10 replay

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 15 '22 17:06 CLAassistant