• Stars
    star
    25
  • Rank 924,970 (Top 19 %)
  • Language
    Go
  • Created over 2 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A testing framework for distributed Go applications

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

  • Various common network nodes:

    • Standard host
    • Layer-3 Routers
    • Layer-2 Switches
    • Layer-3 NAT Routers
    • Layer-3 NAT to host networks
  • Hostname resolution for test nodes (/etc/hosts overlay)

  • Execution of sub-processes, Go code & functions in the network namespace of test nodes

  • Simultaneous setup of multiple isolated networks

  • Ideal for Golang unit tests

  • Can run in workflows powered by GitHub's runners

  • Lean code thanks to functional options

  • Full IPv6 support

  • Per link network emulation and bandwidth limiting via for Netem and TBF queuing disciplines

  • Use of existing network namespaces as nodes

  • Configuration of per-host nftables firewall rules

  • Built-in Ping & Traceroute diagnostic tools

  • Built-in packet tracing with PCAPng output

  • Distributed tracing of events

    • A slog.Handler to emit structured log records as trace events
    • A zapcore.Core to emit zap log messages as trace events
    • Dedicated gont/trace package for emitting trace events
    • Capturing of trace events in PCAPng files
    • WireShark Lua dissector for decoding events
  • Built-in Delve debugger

    • Simultaneous attachment to multiple processes
    • Tracing via HW watch- & breakpoints to emit tracer events (see above)
      • Capture and investigate tracepoints in WireShark
    • Remote debugging via DAP
    • Generation of VS Code compound launch configurations
      • Start Gont test and attach to all processes at once

Examples

Have a look at the unit tests for usage examples:

Prerequisites

  • Go version 1.19 or later
  • traceroute (for testing)
  • libpcap (for compiling BPF filter expressions of packet tracing feature)

Architecture

Authors

Funding acknowledment

European Flag 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.

  • SPDX-FileCopyrightText: 2023 Steffen Vogel <[email protected]>
  • SPDX-License-Identifier: Apache-2.0

More Repositories

1

gose

A tera-scale file uploader
Go
175
star
2

unicode-emoji

Apple, Android and Standard (Symbola) Unicode Emojis for Pidgin
Shell
174
star
3

transwhat

A gateway between the XMPP and the WhatsApp IM networks
Python
123
star
4

stm32cube-gcc

A developement environment for projects based on the STM32Cube firmware.
Makefile
88
star
5

cunicu

A zeroconf peer-to-peer mesh VPN using Wireguard® and Interactive Connectivity Establishment (ICE)
Go
70
star
6

libqt-omd

'libqt-omd' is a software library to control Olympus OM-D and Pen digital cameras over wifi
C++
38
star
7

c11-queues

A single producer single - single consumer queue implemented by a ring buffer with C11's 'stdatomic.h'
C
35
star
8

eagle

My Cadsoft Eagle libraries, settings, CAM jobs etc..
29
star
9

cfac

Code for Aachen - A Go API for accessing real-time information in the city of Aachen
Go
17
star
10

usbasp

USB programmer for Atmel AVR controllers
C
17
star
11

xilinx-hw-server-docker

Run a Xilinx hw_server in a Docker container
Dockerfile
12
star
12

pastie

An OpenCV/Qt GUI with focus on PCB analysis and robot control using latest technologies (C++11, Qt 5.4, OpenCV 3.0)
C++
11
star
13

snippets

Meine Werkzeugssammlung
PHP
9
star
14

dmm_ut61e

C code to retrieve readings from my Uni-Trend multimeter
C++
7
star
15

netgear-nighthawk-mobile

Scripts, details and more around hacking with Netgear Nighthawk Mobile 5G/LTE Routers
Python
5
star
16

netplika

Configure Linux' network emulation queuing discipline
C
4
star
17

rwth-info3

Mein Code des 2. Info Praktikums an der RWTH
C++
4
star
18

transcode

transcode translates standard ANSI C-code simultaniously into assembler and byte code.
PHP
4
star
19

rwth-info2

Alle Versuche meines Informatik 2 Praktikums (Eclipse Workspace)
C++
3
star
20

go-babel

A implementation of the Babel routing protocol in Go
Go
3
star
21

gdoid

GDOI Reference Implementation for IEC 61850-90-5
C
3
star
22

calcelestial

calcelestial calculates positions, rise & set times of celestial bodies
C
3
star
23

fritz-dns

Fritz-DNS is a small authorative DNS server which serves A/AAAA resource records for local hosts connected to an AVM Fritz Box home WiFi router.
Go
3
star
24

vand

A Van/Camper automation and monitoring daemon
Go
2
star
25

pion-perfect-negotation

An example for performing perfect negotation with pion/webrtc
Go
2
star
26

iec61850-90-5

Example IEC61850-90-5 implementation by SISCO and donated to UCAIUG
C
2
star
27

rwth-misc

Some misc stuff created for my studies
TeX
2
star
28

noxon

Some research work on my Terratec Noxon internet radio
PHP
2
star
29

first_lines

Some code snippets from old times...
Visual Basic
1
star
30

libfn

fnordlicht library & sample code in ansi c
Shell
1
star
31

rwth-info1

Lösungen zu den Aufgaben der KGÜ Informatik 1 im WS 2010/11 an der RWTH Aachen
C
1
star
32

ndame_java

Java/Backtracking implementation of th n-dame problem
Java
1
star
33

keyrings.passwordstore

Password-store backend for Python keyring package
Python
1
star
34

hidekey

HIDeKey keeps your credentials or one time passwords secret
C
1
star
35

geoportal

Cancelled project on managing geodata
PHP
1
star
36

qtmatrix

My first steps with QT
C++
1
star
37

rwth-uctetris

Sourcecode und Layout unseres Projekts für die Mikrocontroller AG des MMI's im 2. Semester
C
1
star
38

2d_autos

Simple 2D racing game coded with Delphi
Pascal
1
star
39

modbus-sniffer

MQTT Firmware Extension for 1st generation LG ESS BESS
Go
1
star
40

pushfin

Publishes bank account statements via MQTT and Pushover.
Python
1
star
41

pyspectrum2

pyspectrum2
Python
1
star
42

2d_balls

Yet unfinished billiard, golf simulation in Java
Java
1
star
43

potenz

Simple project to learn for school
Pascal
1
star
44

lacube

Some C++ and SDL matrix calculus
C++
1
star
45

3d-printing

Some 3D models I created for 3D printers
1
star