summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ci/load_images.sh2
-rw-r--r--tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-noha_daily.yaml62
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-openo-ha_daily.yaml116
-rw-r--r--tests/unit/benchmark/scenarios/compute/memload_sample_output.txt4
-rw-r--r--tests/unit/benchmark/scenarios/compute/test_memload.py47
5 files changed, 215 insertions, 16 deletions
diff --git a/tests/ci/load_images.sh b/tests/ci/load_images.sh
index 047393797..b438e09e4 100755
--- a/tests/ci/load_images.sh
+++ b/tests/ci/load_images.sh
@@ -31,7 +31,7 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then
fi
UCA_HOST="cloud-images.ubuntu.com"
-if [ "${YARD_IMG_ARCH}"= "arm64" ]; then
+if [ "${YARD_IMG_ARCH}" == "arm64" ]; then
export CLOUD_IMG_URL="http://${UCA_HOST}/${release}/current/${release}-server-cloudimg-${YARD_IMG_ARCH}.tar.gz"
if ! grep -q "Defaults env_keep += \"CLOUD_IMG_URL\"" "/etc/sudoers"; then
echo "Defaults env_keep += \"CLOUD_IMG_URL\"" | sudo tee -a /etc/sudoers
diff --git a/tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-noha_daily.yaml
new file mode 100644
index 000000000..6ac1a7523
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-noha_daily.yaml
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# k8 nosdn nofeature noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "k8-nosdn-nofeature-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc055.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC055"}'
+-
+ file_name: opnfv_yardstick_tc063.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC063"}'
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-openo-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-openo-ha_daily.yaml
new file mode 100644
index 000000000..49cae7b68
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-openo-ha_daily.yaml
@@ -0,0 +1,116 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# os nosdn openo ha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-nosdn-openo-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc043.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node4.LF","target": "node5.LF"}'
+-
+ file_name: opnfv_yardstick_tc045.yaml
+ constraint:
+ installer: fuel
+-
+ file_name: opnfv_yardstick_tc046.yaml
+ constraint:
+ installer: fuel
+-
+ file_name: opnfv_yardstick_tc047.yaml
+ constraint:
+ installer: fuel
+-
+ file_name: opnfv_yardstick_tc048.yaml
+ constraint:
+ installer: fuel
+-
+ file_name: opnfv_yardstick_tc049.yaml
+ constraint:
+ installer: fuel
+-
+ file_name: opnfv_yardstick_tc050.yaml
+ constraint:
+ installer: fuel
+-
+ file_name: opnfv_yardstick_tc051.yaml
+ constraint:
+ installer: fuel
+-
+ file_name: opnfv_yardstick_tc052.yaml
+ constraint:
+ installer: fuel
+-
+ file_name: opnfv_yardstick_tc053.yaml
+ constraint:
+ installer: fuel
+-
+ file_name: opnfv_yardstick_tc055.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC055"}'
+-
+ file_name: opnfv_yardstick_tc063.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5.yardstick-TC063"}'
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1.LF"}'
+-
+ file_name: opnfv_yardstick_tc027.yaml
+ constraint:
+ installer: compass,fuel
+ pod: huawei-pod1,lf-pod2,ericsson-pod3,ericsson-pod4
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
+ lf-pod2: '{"pod_info": "etc/yardstick/nodes/fuel_baremetal/pod.yaml", "openrc":"/root/openrc", "external_network":"admin_floating_net"}'
+ ericsson-pod3: '{"pod_info": "etc/yardstick/nodes/fuel_baremetal/pod.yaml", "openrc":"/root/openrc", "external_network":"admin_floating_net"}'
+ ericsson-pod4: '{"pod_info": "etc/yardstick/nodes/fuel_baremetal/pod.yaml", "openrc":"/root/openrc", "external_network":"admin_floating_net"}'
diff --git a/tests/unit/benchmark/scenarios/compute/memload_sample_output.txt b/tests/unit/benchmark/scenarios/compute/memload_sample_output.txt
index c23917ff7..1793e2f10 100644
--- a/tests/unit/benchmark/scenarios/compute/memload_sample_output.txt
+++ b/tests/unit/benchmark/scenarios/compute/memload_sample_output.txt
@@ -1,5 +1,3 @@
- total used free shared buffers cached
+ total used free shared buff/cache available
Mem: 263753976 76737332 187016644 2844 853528 67252400
--/+ buffers/cache: 8631404 255122572
Swap: 268029948 0 268029948
-
diff --git a/tests/unit/benchmark/scenarios/compute/test_memload.py b/tests/unit/benchmark/scenarios/compute/test_memload.py
index 76625ef11..ede3309c2 100644
--- a/tests/unit/benchmark/scenarios/compute/test_memload.py
+++ b/tests/unit/benchmark/scenarios/compute/test_memload.py
@@ -74,18 +74,33 @@ class MEMLoadTestCase(unittest.TestCase):
output = self._read_file("memload_sample_output.txt")
mock_ssh.SSH().execute.return_value = (0, output, '')
result = m._get_mem_usage()
- expected_result = {"max": {"used": 76737332, "cached": 67252400,
- "free": 187016644, "shared": 2844,
- "total": 263753976, "buffers": 853528},
- "average": {"used": 76737332, "cached": 67252400,
- "free": 187016644, "shared": 2844,
- "total": 263753976, "buffers": 853528},
- "free": {"memory0": {"used": "76737332",
- "cached": "67252400",
- "free": "187016644",
- "shared": "2844",
- "total": "263753976",
- "buffers": "853528"}}}
+ expected_result = {
+ "max": {
+ 'shared': 2844,
+ 'buff/cache': 853528,
+ 'total': 263753976,
+ 'free': 187016644,
+ 'used': 76737332
+ },
+ "average": {
+ 'shared': 2844,
+ 'buff/cache': 853528,
+ 'total': 263753976,
+ 'free': 187016644,
+ 'used': 76737332
+ },
+ "free": {
+ "memory0": {
+ "used": "76737332",
+ "buff/cache": "853528",
+ "free": "187016644",
+ "shared": "2844",
+ "total": "263753976",
+ "available": "67252400"
+ }
+ }
+ }
+
self.assertEqual(result, expected_result)
def _read_file(self, filename):
@@ -94,3 +109,11 @@ class MEMLoadTestCase(unittest.TestCase):
with open(output) as f:
sample_output = f.read()
return sample_output
+
+
+def main():
+ unittest.main()
+
+
+if __name__ == '__main__':
+ main()