summaryrefslogtreecommitdiffstats
path: root/testing/robot/smoke.robot
diff options
context:
space:
mode:
authorTomas Cechvala <tcechval@cisco.com>2017-03-07 12:03:11 +0100
committerTomas Cechvala <tcechval@cisco.com>2017-03-07 16:52:33 +0100
commit251655730cd037a9bd5dbbb42ba07cb64bacde88 (patch)
treea35985a089c026f97e0385d88f741466e7a257f0 /testing/robot/smoke.robot
parent27f4d1c945814b2dc127c06ec35feeed4d9d432a (diff)
Improving robot smoke test
Suite setup modified: - flavor is checked and created if it does not exist - image is checked and created if it does not exist Change-Id: I0254827034fcb2e1a7f5f0983b5a5bad29eada43 Signed-off-by: Tomas Cechvala <tcechval@cisco.com>
Diffstat (limited to 'testing/robot/smoke.robot')
-rw-r--r--testing/robot/smoke.robot22
1 files changed, 16 insertions, 6 deletions
diff --git a/testing/robot/smoke.robot b/testing/robot/smoke.robot
index fddac5d..a6c7d70 100644
--- a/testing/robot/smoke.robot
+++ b/testing/robot/smoke.robot
@@ -61,12 +61,8 @@ Setup Suite
Set Suite Variable ${port2_id} ${None}
Set Suite Variable ${vm1_id} ${None}
Set Suite Variable ${vm2_id} ${None}
- ${result} = Check Flavor Exists ${vm_flavor}
- Log ${vm_flavor}
- Should be True ${result}
- ${result} = Check Image Exists ${vm_image}
- Log ${vm_image}
- Should be True ${result}
+ Ensure Image
+ Ensure Flavor
Teardown Suite
Run Keyword If $vm1_id is not $None Delete vm ${vm1_id}
@@ -75,6 +71,20 @@ Teardown Suite
Run Keyword If $port2_id is not $None Delete ports ${port2_id}
Run Keyword If $network_id is not $None Delete network ${network_id}
+Ensure Flavor
+ ${result} = Check Flavor Exists ${vm_flavor}
+ Return From Keyword If '${result}' == 'True'
+ Create Flavor ${vm_flavor} ram=768
+ ${result} = Check Flavor Exists ${vm_flavor}
+ Should be True ${result}
+
+Ensure Image
+ ${result} = Check Image Exists ${vm_image}
+ Return From Keyword If '${result}' == 'True'
+ Create Image ${vm_image} /home/opnfv/functest/data/cirros-0.3.4-x86_64-disk.img
+ ${result} = Check Image Exists ${vm_image}
+ Should be True ${result}
+
Create tenant network
&{response} = create network ${network_name}
log many &{response}