Home

Awesome

Gont: A Go testing framework for distributed applications

GitHub build goreportcard Codecov branch License GitHub go.mod Go version Go Reference DOI

Gont is a Go package to support the development networked and distributed applications.

It can construct a virtual network using Linux network spaces, to simulate switches, routers, NAT and endpoints, on a single machine (VM, cloud or native). In addition, it supports developers with tooling for tracing and debugger tooling for investigating distributed applications.

Gont is heavily inspired by Mininet. It allows the user to build virtual network topologies defined Go code. Under the hood the network is then constructed using Linux virtual bridges and network namespaces.

Gont runs on all moderatly recent Linux versions and requires NET_ADMIN capabilities (or root access).

Using Gont, developers can test complex distributed peer-to-peer and federated applications like routing daemons or social networks and messaging. Integration tests can be automated and executed in CI environments like GitHub actions (which are in fact used to test Gont itself).

Getting started

Have a look at our slide set to get you started.

Features

Examples

Have a look at the unit tests for usage examples:

Prerequisites

Architecture

<!-- ```mermaid classDiagram direction BT class Network { Nodes []Node Links []Link } class Link { Left Endpoint Right Endpoint } class Interface { Name string Node Node Addresses []net.IPNet } class Namespace { NsFd int Run() } class Node { Name string } class Host { Interfaces []Interface AddInterface() } class Switch { Ports []Port AddPort() } class Router { AddRoute() } class NAT { } Node *-- Namespace Host *-- Node Router *-- Host NAT *-- Router Switch *-- Node Interface "1" o-- "1" Node Link "1" o-- "2" Interface Network "1" o-- "*" Link Network "1" o-- "*" Node ``` -->

Authors

Funding acknowledment

<img alt="European Flag" src="https://erigrid2.eu/wp-content/uploads/2020/03/europa_flag_low.jpg" align="left" style="margin-right: 10px"/> The development of Gont has been supported by the ERIGrid 2.0 project
of the H2020 Programme under Grant Agreement No. 870620

License

Gont is licensed under the Apache 2.0 license.