From 29a1a15feba6af9b329360d0281ee534e007a35f Mon Sep 17 00:00:00 2001 From: Ryo Kawaguchi Date: Thu, 18 Apr 2024 23:37:43 +0900 Subject: [PATCH] Add a docker test case --- docker-tests/run-docker-tests.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docker-tests/run-docker-tests.sh b/docker-tests/run-docker-tests.sh index 1eb4167..a5f0ce7 100755 --- a/docker-tests/run-docker-tests.sh +++ b/docker-tests/run-docker-tests.sh @@ -201,6 +201,30 @@ 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 + sleep 5 + + info "Confirming the CIDR rename from peer1" + cmd docker exec "$PEER1_CONTAINER" innernet list-cidrs evilcorp | grep coolbeans + + 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 | grep robots +} + # 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