Compare the environment so we can detect a change in password
This commit is contained in:
1 parent
65f435f042
commit
436f8ef7c8
2 files changed
+11
-2
No files matched your search
@@ -13,6 +13,15 @@ assert_raises "weave_on $HOST1 launch-router --log-level=debug" 1
|
||||
weave_on $HOST1 stop-router
|
||||
ID2=$(weave_on $HOST1 launch-router --log-level=debug)
|
||||
assert "[ $ID != $ID2 ]"
|
||||
|
||||
# Stop then start with different password
|
||||
weave_on $HOST1 stop-router
|
||||
ID3=$(weave_on $HOST1 launch-router --password=xyzzy)
|
||||
assert "[ $ID2 != $ID3 ]"
|
||||
# Stop then start with same password
|
||||
weave_on $HOST1 stop-router
|
||||
assert "weave_on $HOST1 launch-router --password=xyzzy" "$ID3"
|
||||
|
||||
# Fails on bad argument
|
||||
assert_raises "weave_on $HOST1 launch-plugin --foo" 1
|
||||
# Fails again on bad argument, although there is a dead container
|
||||
|
||||
@@ -937,10 +937,10 @@ detach() {
|
||||
######################################################################
|
||||
|
||||
args_match() {
|
||||
prev_args="$(docker inspect -f '{{.Args}}' $1)"
|
||||
prev_args="$(docker inspect -f '{{.Args}} {{.Config.Env}}' $1)"
|
||||
shift
|
||||
dummy_container=$(docker create "$@" 2>/dev/null) || return 1
|
||||
dummy_args="$(docker inspect -f '{{.Args}}' $dummy_container)"
|
||||
dummy_args="$(docker inspect -f '{{.Args}} {{.Config.Env}}' $dummy_container)"
|
||||
docker rm $dummy_container >/dev/null
|
||||
[ "$prev_args" = "$dummy_args" ]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user