var img = document.createElement('img'); img.src = "https://matomo.0l.de/piwik.php?idsite=5&rec=1&url=https://cunicu.li" + location.pathname; img.style = "border:0"; img.alt = "tracker"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(img,s);
Skip to main content

Development

cunīcu is written almost completely in Go and heavily relies on awesome tooling and packages for Golang:

  • GoReleaser for release automation
  • Ginkgo and Gomega for testing
  • Pion for its ICE, STUN, TURN implementation
  • Gont for end-to-end testing in various network topologies

Furthermore use the following services to manage our development:

  • GitHub for source code management and CI pipelines
  • Codecov for code coverage analysis

Testing

We aim to maintain a test coverage above 80% of the lines of code. Please make sure that your merge requests include tests which do not lower the coverage percentage.

cunīcu's code-base is tested using the Ginkgo / Gomega testing framework. Unit tests can be found alongside the code in files with a _test.go suffix. End-to-end (e2e) integration tests can be found in the test/e2e directory.

The e2e tests use Gont to construct virtual network environment using Linux's net namespaces and veth point-to-point links. This allows us to test cunīcu in both simple and complex network topologies including, L2 switches, L3 routers, firewalls and NAT boxes.

Nix

We provide a Nix flake for cunīcu and most related Git repositories to quickly jump into a reproducable development shell by running:

nix develop ./nix

In this shell all required build-time dependencies and tools for cunīcu are available.

I also recommend to setup direnv to automatically enter a development shell whenever you are residing inside the repos directory structure:

echo "use flake ./nix --impure" > .envrc

Website

Please run the following commands to start a development server for the website:

# Ideally you use the Nix flake here to get a working Yarn/NodeJS setup
cd website
yarn start
echo "Test"