k3s/test/images/net
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
..
common Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
nat Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
.gitignore Add test image for networking related tests 2016-10-25 13:34:03 -07:00
BASEIMAGE Multi Arch test images 2017-06-26 12:49:45 +05:30
BUILD Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Dockerfile Multi Arch test images 2017-06-26 12:49:45 +05:30
Makefile Move go build to image-utils 2017-06-28 19:19:25 +05:30
README.md Add test image for networking related tests 2016-10-25 13:34:03 -07:00
VERSION Fix review comments - luxas, ixdy 2017-06-30 18:51:23 +05:30
main.go fix golint errors on master for 1.6 2016-12-05 15:01:33 -08:00

README.md

Overview

The goal of this Go project is to consolidate all low-level network testing "daemons" into one place. In network testing we frequently have need of simple daemons (common/Runner) that perform some "trivial" set of actions on a socket.

Usage

  • A package for each general area that is being tested, for example nat/ will contain Runners that test various NAT features.
  • Every runner should be registered via main.go:makeRunnerMap().
  • Runners receive a JSON options structure as to their configuration. Run() should return the disposition of the test.

Runners can be executed into two different ways, either through the the command-line or via an HTTP request:

Command-line

$ ./net -runner <runner> -options <json>
./net \
  -runner nat-closewait-client \
  -options '{"RemoteAddr":"127.0.0.1:9999"}'

HTTP server

$ ./net --serve :8889
$ curl -v -X POST localhost:8889/run/nat-closewait-server \
  -d '{"LocalAddr":"127.0.0.1:9999"}'

Analytics