-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Justfile
24 lines (18 loc) · 1.42 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
prepare-test:
podman pull docker.io/hashicorp/consul docker.io/archlinux
podman build -f Containerfile.testing --tag wiresmith-testing
test:
cargo test
# Interactive test using zellij and podman
interactive:
cargo build
podman rm --depend -f --filter label=testcontainer
podman run -t --replace --rm --name consul -l testcontainer -d -p 8500:8500 docker.io/hashicorp/consul agent -dev -client 0.0.0.0
podman run -t --replace --rm --name wiresmith1 -l testcontainer -d -p 11111:11111/udp --hostname wiresmith1 --network slirp4netns:allow_host_loopback=true --cap-add SYS_ADMIN,NET_ADMIN -v ./target/debug/wiresmith:/usr/bin/wiresmith --tz UTC --entrypoint /sbin/init wiresmith-testing
podman run -t --replace --rm --name wiresmith2 -l testcontainer -d -p 22222:22222/udp --hostname wiresmith2 --network slirp4netns:allow_host_loopback=true --cap-add SYS_ADMIN,NET_ADMIN -v ./target/debug/wiresmith:/usr/bin/wiresmith --tz UTC --entrypoint /sbin/init wiresmith-testing
podman run -t --replace --rm --name wiresmith3 -l testcontainer -d -p 33333:33333/udp --hostname wiresmith3 --network slirp4netns:allow_host_loopback=true --cap-add SYS_ADMIN,NET_ADMIN -v ./target/debug/wiresmith:/usr/bin/wiresmith --tz UTC --entrypoint /sbin/init wiresmith-testing
zellij --layout interactive_test.kdl
sleep 1
podman rm --depend -f --filter label=testcontainer
watch-interactive:
cargo watch -cs 'just interactive'