Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
scripts/test_update: fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantin Khlebnikov <[email protected]>
  • Loading branch information
koct9i committed Oct 9, 2015
1 parent 8a93ea9 commit fc23750
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions scripts/test_update
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -ex

if [ $# -eq 0 ]; then
echo "Please specify new package path"
Expand Down Expand Up @@ -41,33 +41,33 @@ check_state() {
expect "$(portoctl get z isolate)" = "true"
expect "$(portoctl get z state)" = "stopped"

# current stable version (1.9) reports invalid state
# for meta containers; uncomment when stable is 1.16
#expect "$(portoctl get a state)" = "meta"
# current stable version (1.9) reports invalid state
# for meta containers; uncomment when stable is 1.16
#expect "$(portoctl get a state)" = "meta"

expect "$(portoctl get a/b command)" = "sleep 4000"
expect "$(portoctl get a/b state)" = "running"
}

cleanup_tc() {
for link in $(ip -o link | awk -F: '{print $2}'); do
tc filter del dev $link pref 10 || :
sudo tc filter del dev $link pref 10 || :
done
}

wait_porto() {
echo "Waiting porto startup..."
# versions prior to 1.17 don't return error when portoctl
# can't connect to socket, just sleep here
sleep 10
echo "Waiting porto startup..."
# versions prior to 1.17 don't return error when portoctl
# can't connect to socket, just sleep here
sleep 10

# for i in `seq 60`; do
# if portoctl list; then
# return
# fi
# if portoctl list; then
# return
# fi
#
# sleep 1
# done
# sleep 1
# done
#
# echo "Porto is dead, don't continue"
# exit 1
Expand Down

0 comments on commit fc23750

Please sign in to comment.