erldns is an open source project licensed under an MIT license. Contributions are gladly accepted via GitHub pull requests.
Clone the repository and move into it:
git clone [email protected]:dnsimple/erldns.git
cd erldns
git checkout -b dev_new_feature_xyz
Compile the project and run the test suite to check everything works as expected.
make all
Please follow the instructions available at https://www.rebar3.org/docs/configuration/dependencies/
mkdir _checkouts
ln -s ../<projectX dependency dir> _checkouts/
ln -s ../<projectY dependency dir> _checkouts/
As of 1.1.0 release, the custom handlers' implementation has been extended to support versioning. register_handler/3 and get_versioned_handlers/0 functions have been added. Using versioning in new handlers is encouraged.
erldns includes several test mechanisms.
To execute unit tests (and dialyzer for static analysis):
make test
The dnstest tool provides a suite of black-box functional tests for erldns (and any other DNS authoritative name server). The tests are largely based on the excellent suite of tests in PowerDNS. To run the tests, you must change erldns.config
so that zones are loaded from priv/zones-test.json
.
[
{erldns, [
{zones, "priv/zones-test.json"}
]}
]
Then you will need to run erldns. At this point it should be ready to test with dnstest. See the dnstest README for more details on how to run dnstest.
If your editor doesn't automatically format Erlang code using erlfmt, run:
make format
-
Run the test suite and ensure all the tests pass.
-
Commit and push the changes
git commit -a -m "* <adding feature/enhancement X/Y/Z" git push origin dev_new_feature_xyz
-
Initiate PR for reviewing and merging upstream.
Submit unit tests for your changes. You can test your changes on your machine by running the test suite.