This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2051 from /issues/2046-static-ip
Fix plugin accepting --ip address
- Loading branch information
Showing
3 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#! /bin/bash | ||
|
||
. ./config.sh | ||
|
||
start_suite "Test Docker Network plugin with specified subnet" | ||
|
||
weave_on $HOST1 launch | ||
|
||
# using ssh rather than docker -H because CircleCI docker client is older | ||
$SSH $HOST1 docker network create --driver weavemesh --ipam-driver weavemesh --subnet 10.40.0.0/16 testsubnet | ||
|
||
$SSH $HOST1 docker run --name=c1 -dt --net=testsubnet --ip 10.40.0.1 $SMALL_IMAGE /bin/sh | ||
$SSH $HOST1 docker run --name=c2 -dt --net=testsubnet $SMALL_IMAGE /bin/sh | ||
|
||
assert "container_ip $HOST1 c1" "10.40.0.1" | ||
assert "container_ip $HOST1 c2" "10.40.0.2" # assuming linear allocation strategy | ||
assert_raises "exec_on $HOST1 c1 $PING c2" | ||
assert_raises "exec_on $HOST1 c2 $PING c1" | ||
|
||
end_suite |