Skip to content

Commit

Permalink
Add a docker test case
Browse files Browse the repository at this point in the history
  • Loading branch information
skywhale committed Apr 18, 2024
1 parent 99dd1ee commit b10347e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docker-tests/run-docker-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,29 @@ test_simultaneous_redemption() {
cmd docker exec "$PEER2_CONTAINER" ping -c3 10.66.1.1
}

test_rename_cidr() {
info "Renaming CIDR from peer1"
cmd docker exec "$PEER1_CONTAINER" innernet \
rename-cidr evilcorp \
--name "robots" \
--new-name "coolbeans" \
--yes

info "Confirming the CIDR rename from peer1"
cmd docker exec "$PEER1_CONTAINER" innernet list-cidrs evilcorp

info "Renaming CIDR from server"
cmd docker exec "$SERVER_CONTAINER" innernet-server \
rename-cidr evilcorp \
--name "coolbeans" \
--new-name "robots" \
--yes
sleep 5

info "Confirming the CIDR rename from peer1"
cmd docker exec "$PEER1_CONTAINER" innernet list-cidrs evilcorp
}

# Run tests (functions prefixed with test_) in alphabetical order.
# Optional filter provided by positional arguments is applied.
for func in $(declare -F | awk '{print $3}'); do
Expand Down

0 comments on commit b10347e

Please sign in to comment.