Files
cunicu/docs/dev/index.md
Steffen Vogel 3bee839348 fix: Update copyright years
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2025-01-01 22:45:39 +01:00

2.2 KiB

sidebar_position
sidebar_position
199

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"