File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed
Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ echo "OFFER CLAIM INVALID USER TEST"
4343
4444openstack --os-cloud test1-subproject-1 esi offer claim $test_offer_uuid -f shell > $tmpfile 2> $errfile
4545ec=$?
46- expected_error=' esi_leap:offer:offer_admin is disallowed by policy '
46+ expected_error=" Access was denied to offer $test_offer_uuid . "
4747
4848if ! grep -q " $expected_error " $errfile ; then
4949 if [[ $ec -eq 0 ]]; then
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ end=$(date -d "+5 days" +%Y-%m-%d)
77
88# Setup script, contains offer create test
99
10- ./setup.sh $tmpfile $project_id $start $end $resource_type
10+ ./setup.sh $tmpfile $project_id $start $end
1111
1212. $tmpfile
1313
@@ -28,7 +28,7 @@ openstack --os-cloud test1 esi offer create \
2828 $node_uuid \
2929 --start-time $start \
3030 --end-time $end \
31- --resource-type $resource_type \
31+ --resource-type dummy_node \
3232 -f shell > $tmpfile 2> $errfile
3333ec=$?
3434expected_error=" Time conflict for dummy_node $node_uuid ."
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ openstack --os-cloud test2 esi offer create \
7676 --resource-type dummy_node \
7777 -f shell > $tmpfile 2> $errfile
7878ec=$?
79- expected_error=" esi_leap:offer:offer_admin is disallowed by policy "
79+ expected_error=" Access was denied to dummy_node $node_uuid . "
8080
8181if ! cat $errfile | grep -q " $expected_error " ; then
8282 if [[ $ec -eq 0 ]]; then
@@ -109,7 +109,7 @@ openstack --os-cloud test2 esi lease create \
109109 --resource-type dummy_node \
110110 -f shell > $tmpfile 2> $errfile
111111ec=$?
112- expected_error=" esi_leap:offer:offer_admin is disallowed by policy "
112+ expected_error=" Access was denied to dummy_node $node_uuid . "
113113
114114if ! cat $errfile | grep -q " $expected_error " ; then
115115 if [[ $ec -eq 0 ]]; then
Original file line number Diff line number Diff line change @@ -14,17 +14,18 @@ end=$(date -d "+1 minute" +"%Y-%m-%d %H:%M:%S")
1414# The uuid variable will be overwritten, so we save it here
1515test_offer_uuid=$uuid
1616# Run cleanup if the script exits, contains offer delete test
17+ # Note: deletion will fail if handling of expired offers works
1718trap " ./cleanup.sh $test_offer_uuid ; rm -f $tmpfile $errfile $nodefile " EXIT
1819
19- sleep 2m
20- date +" %Y-%m-%D %H:%M:%S"
21-
2220# ##################################
2321# # OFFER LIST EXPIRED OFFER TEST ##
2422# ##################################
2523
2624echo " OFFER LIST EXPIRED OFFER TEST"
2725
26+ sleep 2m
27+ date +" %Y-%m-%D %H:%M:%S"
28+
2829openstack --os-cloud test1-subproject esi offer list -f json > $tmpfile \
2930 || { ec=$? ; echo " ERROR: failed to list offers" >&2 ; exit $ec ; }
3031cat $tmpfile
You can’t perform that action at this time.
0 commit comments