Browse code

Only run swift excercise when swift is enabled.

Chmouel Boudjnah authored on 2011/11/04 01:04:26
Showing 1 changed files
... ...
@@ -192,21 +192,23 @@ nova secgroup-delete $SECGROUP
192 192
 # make sure that we can describe instances
193 193
 euca-describe-instances
194 194
 
195
-# Testing Swift
196
-# =============
195
+if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
196
+    # Testing Swift
197
+    # =============
197 198
 
198
-# Check if we have to swift via keystone
199
-swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD stat
199
+    # Check if we have to swift via keystone
200
+    swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD stat
200 201
 
201
-# We start by creating a test container
202
-swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD post testcontainer
202
+    # We start by creating a test container
203
+    swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD post testcontainer
203 204
 
204
-# add some files into it.
205
-swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD upload testcontainer /etc/issue
205
+    # add some files into it.
206
+    swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD upload testcontainer /etc/issue
206 207
 
207
-# list them
208
-swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD list testcontainer 
208
+    # list them
209
+    swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD list testcontainer 
209 210
 
210
-# And we may want to delete them now that we have tested that
211
-# everything works.
212
-swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD delete testcontainer
211
+    # And we may want to delete them now that we have tested that
212
+    # everything works.
213
+    swift --auth-version 2 -A http://${HOST_IP}:5000/v2.0 -U admin -K $ADMIN_PASSWORD delete testcontainer
214
+fi