
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@dnslink/test
Advanced tools
A programming-language independent test harness for DNSLink implementations.
A language independent test harness for DNSLink implementations such as dnslink-std/js or dnslink-std/go.
The tests are written in javascript and published through npm. This means
for the execution of the tests Node.js
is required.
You can run the tests "on-the-fly" using $ npx @dnslink/test
or install
them permanently using npm i @dnslink/test -g
and then run it using $ dnslink-test
.
To use this harness you need to prepare an executable, lets call it my-impl
.
my-impl
needs to be able to process command line arguments. The first argument for my-impl
is a domain name.my-impl
needs to output a JSON formatted object to stdout
.found
object containing all the DNSLink entries found for a domain.found
, like: { "links": { "foo": "bar" } }
, if redirects
happen with deep linking, the path
property needs to be set like
..."path": [{ "pathname": "/dir/name", "search": { "foo": ["bar"] }}]
dnslink-test -- my-impl
and it will show whether or not your implementation passes.log
object that contains all the log entries and run
the tests with the --enable log
flag: $ dnslink-test --enable log -- my-impl
.--skip
or --only
to disable/enable specific tests in order to make development
more comfortable.The list of rules that an implementation needs to cover is defined in ./integration-tests.js
.
dnslink-test
comes automatically with a DNS server that is run on the localhost's UDP and TCP ports, as well as
a DNS-over-HTTPS compatible endpoint (thought it is a regular HTTP endpoint).
The implementation tested receives a second argument which contains a JSON object. Looking like this:
{
"udp": 2345,
"tcp": 2346,
"doh": 2347,
"flags": {}
}
The udp
, tpc
and doh
numbers are ports on which the local server are listening for the duration of the
tests. They contain the DNS TXT entries for all known domains.
Note: The flags
objects contains any flags that you may have passed in.
One can also run the DNS server in a standalone mode (for debug, or in custom CI setups):
$ dnslink-test --server-only
{
"udp": 49953,
"tcp": 37755,
"doh": 39427
}
Published under dual-license: MIT OR Apache-2.0
FAQs
A programming-language independent test harness for DNSLink implementations.
The npm package @dnslink/test receives a total of 6 weekly downloads. As such, @dnslink/test popularity was classified as not popular.
We found that @dnslink/test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.