Adapt Bottlenecks Euphrates framework 77/52577/2
authorxudan <xudan16@huawei.com>
Sat, 24 Feb 2018 09:35:08 +0000 (04:35 -0500)
committerxudan <xudan16@huawei.com>
Sat, 24 Feb 2018 09:53:44 +0000 (04:53 -0500)
Bottlenecks stress test needs some adaptions about Bottlenecks
Euphrates release.

JIRA: DOVETAIL-587

Change-Id: Ia447143c8f08924ac1b190ee0173f39e462c5dfa
Signed-off-by: xudan <xudan16@huawei.com>
dovetail/compliance/proposed_tests.yml
dovetail/conf/bottlenecks_config.yml
dovetail/conf/cmd_config.yml
dovetail/conf/dovetail_config.yml
dovetail/container.py
dovetail/testcase/stress.tc001.yml [moved from dovetail/testcase/resiliency.tc001.yml with 83% similarity]

index bae2375..0f04aca 100644 (file)
@@ -12,3 +12,5 @@ proposed_tests:
     - dovetail.ha.tc011
     # vnf
     - dovetail.vnf.tc001
+    # stress
+    - dovetail.stress.tc001
index 43df8c5..f33e50f 100644 (file)
@@ -1,16 +1,29 @@
 ---
 bottlenecks:
   image_name: opnfv/bottlenecks
-  docker_tag: cvp.0.4.0
+  docker_tag: stable
   opts: '-id --privileged=true'
   config:
     dir: '/home/opnfv/userconfig'
   pre_condition:
-    - 'echo test for precondition in bottlenecks'
+    - 'source /tmp/admin_rc.sh &&
+       (openstack --insecure image list | grep cirros-0.3.5 ||
+       openstack --insecure image create cirros-0.3.5
+       --disk-format qcow2 --container-format bare
+       --file /home/opnfv/userconfig/pre_config/cirros-0.3.5-x86_64-disk.img)'
+    - 'source /tmp/admin_rc.sh &&
+       (openstack --insecure flavor list | grep yardstick-flavor ||
+       openstack --insecure flavor create --id 100
+       --ram 1024 --disk 3 --vcpus 1 yardstick-flavor)'
   cmds:
-    - '/home/opnfv/bottlenecks/run_tests.sh -c {{validate_testcase}}'
+    - 'python /home/opnfv/bottlenecks/testsuites/run_testsuite.py testcase {{validate_testcase}} True'
   post_condition:
-    - 'echo test for postcondition in bottlenecks'
+    - 'source /tmp/admin_rc.sh &&
+       (! openstack --insecure image list | grep cirros-0.3.5 ||
+       openstack --insecure image delete cirros-0.3.5)'
+    - 'source /tmp/admin_rc.sh &&
+       (! openstack --insecure flavor list | grep yardstick-flavor ||
+       openstack --insecure flavor delete yardstick-flavor)'
   result:
     dir: '/tmp'
     file_path: 'bottlenecks.log'
index 2ae40df..91a44b0 100644 (file)
@@ -21,21 +21,21 @@ cli:
           - '-y'
         path:
           - 'yardstick/docker_tag'
-        help: 'Overwrite tag for yardstick docker container (e.g. danube.3.2)'
+        help: 'Overwrite tag for yardstick docker container (e.g. opnfv-5.1.0)'
       func_tag:
         flags:
           - '--func_tag'
           - '-f'
         path:
           - 'functest/docker_tag'
-        help: 'Overwrite tag for functest docker container (e.g. ovp.1.0.0)'
-      bott_tag:
-        flags:
-          - '--bott_tag'
-          - '-b'
-        path:
-          - 'bottlenecks/docker_tag'
-      #   help: 'Overwrite tag for bottlenecks docker container (e.g. cvp.0.4.0)'
+        help: 'Overwrite tag for functest docker container (e.g. euphrates)'
+      bott_tag:
+        flags:
+          - '--bott_tag'
+          - '-b'
+        path:
+          - 'bottlenecks/docker_tag'
+        help: 'Overwrite tag for bottlenecks docker container (e.g. stable)'
     control:
       testsuite:
         flags:
index e3b58d9..290798d 100644 (file)
@@ -45,7 +45,7 @@ testarea_supported:
   - ipv6
   - sdnvpn
   - vping
-  - resiliency
+  - stress
   - tempest
   - optional
   - mandatory
index 4c0d8c3..8b4f0fc 100644 (file)
@@ -137,6 +137,10 @@ class Container(object):
         docker_vol = '-v /var/run/docker.sock:/var/run/docker.sock'
         env = ('-e Yardstick_TAG={} -e OUTPUT_FILE={}.out'
                .format(yard_tag, testcase_name))
+        insecure = os.getenv("OS_INSECURE")
+        if insecure and insecure.lower() == 'true':
+            env = env + " -e OS_CACERT=False "
+
         report = ""
         if dovetail_config['report_dest'].startswith("http"):
             report = ("-e BOTTLENECKS_DB_TARGET={}"
similarity index 83%
rename from dovetail/testcase/resiliency.tc001.yml
rename to dovetail/testcase/stress.tc001.yml
index 8639984..fd29f27 100644 (file)
@@ -1,6 +1,6 @@
 ---
-dovetail.resiliency.tc001:
-  name: dovetail.resiliency.tc001
+dovetail.stress.tc001:
+  name: dovetail.stress.tc001
   objective: > # This test case verifies the ability of the SUT setting up VM pairs
     # for different tenants and providing acceptable capacity after the amount of
     # VM pairs reaches certain quantity.