Merge pull request #159 from chmouel/swift-excercise-only-when-enabled
Only do swift excercise when enabled.
This commit is contained in:
commit
05ffac1ee0
1 changed files with 15 additions and 13 deletions
28
exercise.sh
28
exercise.sh
|
@ -192,21 +192,23 @@ nova secgroup-delete $SECGROUP
|
||||||
# make sure that we can describe instances
|
# make sure that we can describe instances
|
||||||
euca-describe-instances
|
euca-describe-instances
|
||||||
|
|
||||||
# Testing Swift
|
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
|
||||||
# =============
|
# Testing Swift
|
||||||
|
# =============
|
||||||
|
|
||||||
# Check if we have to swift via keystone
|
# Check if we have to swift via keystone
|
||||||
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD stat
|
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD stat
|
||||||
|
|
||||||
# We start by creating a test container
|
# We start by creating a test container
|
||||||
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD post testcontainer
|
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD post testcontainer
|
||||||
|
|
||||||
# add some files into it.
|
# add some files into it.
|
||||||
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD upload testcontainer /etc/issue
|
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD upload testcontainer /etc/issue
|
||||||
|
|
||||||
# list them
|
# list them
|
||||||
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD list testcontainer
|
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD list testcontainer
|
||||||
|
|
||||||
# And we may want to delete them now that we have tested that
|
# And we may want to delete them now that we have tested that
|
||||||
# everything works.
|
# everything works.
|
||||||
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD delete testcontainer
|
swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD delete testcontainer
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue