Browse code

Fix xenapi functions' tests

The tests got outdated, this fix makes the tests pass again.

Change-Id: Iadddfbf34bf79ba455811645e766c2f3d0fcca84

Mate Lakat authored on 2013/12/11 21:21:12
Showing 2 changed files
... ...
@@ -73,7 +73,7 @@ function [ {
73 73
         done
74 74
         return 1
75 75
     fi
76
-    echo "Mock test does not implement the requested function"
76
+    echo "Mock test does not implement the requested function: ${1:-}"
77 77
     exit 1
78 78
 }
79 79
 
... ...
@@ -118,7 +118,7 @@ function test_zip_snapshot_location {
118 118
 function test_create_directory_for_kernels {
119 119
     (
120 120
         . mocks
121
-        mock_out get_local_sr uuid1
121
+        mock_out get_local_sr_path /var/run/sr-mount/uuid1
122 122
         create_directory_for_kernels
123 123
     )
124 124
 
... ...
@@ -141,7 +141,7 @@ EOF
141 141
 function test_create_directory_for_images {
142 142
     (
143 143
         . mocks
144
-        mock_out get_local_sr uuid1
144
+        mock_out get_local_sr_path /var/run/sr-mount/uuid1
145 145
         create_directory_for_images
146 146
     )
147 147
 
... ...
@@ -199,8 +199,7 @@ function test_get_local_sr {
199 199
 
200 200
     [ "$RESULT" == "uuid123" ]
201 201
 
202
-    assert_xe_min
203
-    assert_xe_param "sr-list" "name-label=Local storage"
202
+    assert_xe_param "pool-list" params=default-SR minimal=true
204 203
 }
205 204
 
206 205
 function test_get_local_sr_path {