Skip to content

Commit 414c534

Browse files
author
Matthew Fisher
committed
fix(test-swift): remove reliance on local swift client
1 parent 42225fd commit 414c534

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ branches:
55
sudo: required
66
services:
77
- docker
8-
before_install:
9-
- sudo apt-get -qq update
10-
- sudo apt-get install -y python-swiftclient
118
env:
129
# HACK(bacongobbler): make travis tests work
1310
- DEIS_REGISTRY=travis-ci/

contrib/ci/test-swift.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SWIFT_DATA=$(docker run -v /srv --name SWIFT_DATA busybox)
3232

3333
# kill containers when this script exits or errors out
3434
trap 'kill-container $SWIFT_JOB' INT TERM
35-
SWIFT_JOB=$(docker run --name onlyone --hostname onlyone -d -p 12345:8080 --volumes-from SWIFT_DATA -t deis/swift-onlyone:git-8516d23)
35+
SWIFT_JOB=$(docker run --name onlyone --hostname onlyone -d --volumes-from SWIFT_DATA -t deis/swift-onlyone:git-8516d23)
3636

3737

3838
# postgres container command
@@ -56,8 +56,8 @@ check-postgres $PG_JOB
5656
# check if swift has some backups ... 3 ?
5757
puts-step "checking if swift has at least 3 backups"
5858

59-
BACKUPS="$(swift -A http://127.0.0.1:12345/auth/v1.0 -U test:tester -K testing list deis-swift-test | grep basebackups_005 | grep json)"
60-
NUM_BACKUPS="$(swift -A http://127.0.0.1:12345/auth/v1.0 -U test:tester -K testing list deis-swift-test | grep basebackups_005 | grep -c json)"
59+
BACKUPS="$(docker exec $SWIFT_JOB swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing list deis-swift-test | grep basebackups_005 | grep json)"
60+
NUM_BACKUPS="$(docker exec $SWIFT_JOB swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing list deis-swift-test | grep basebackups_005 | grep -c json)"
6161
# NOTE (bacongobbler): the BACKUP_FREQUENCY is only 1 second, so we could technically be checking
6262
# in the middle of a backup. Instead of failing, let's consider N+1 backups an acceptable case
6363
if [[ ! "$NUM_BACKUPS" -eq "5" && ! "$NUM_BACKUPS" -eq "6" ]]; then

0 commit comments

Comments
 (0)