- Go: https://golang.org/dl/
- Golint
go get -u -v github.com/golang/lint/golint
The workflow is pretty standard:
- Fork github.com/streadway/amqp
- Add the pre-commit hook:
ln -s ../../pre-commit .git/hooks/pre-commit
- Create your feature branch (
git checkout -b my-new-feature
) - Run integration tests (see below)
- Implement tests
- Implement fixs
- Commit your changes (
git commit -am 'Add some feature'
) - Push to a branch (
git push -u origin my-new-feature
) - Submit a pull request
The test suite assumes that:
- A RabbitMQ node is running on localhost with all defaults: https://www.rabbitmq.com/download.html
AMQP_URL
is exported toamqp://guest:guest@127.0.0.1:5672/
After starting a local RabbitMQ, run integration tests with the following:
env AMQP_URL=amqp://guest:guest@127.0.0.1:5672/ go test -v -cpu 2 -tags integration -race
All integration tests should use the integrationConnection(...)
test
helpers defined in integration_test.go
to setup the integration environment
and logging.