Merge "update docker version to 16.04"
[yardstick.git] / tests / functional / test_cli_scenario.py
1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10
11 from __future__ import absolute_import
12 import unittest
13
14 from tests.functional import utils
15
16
17 class ScenarioTestCase(unittest.TestCase):
18
19     def setUp(self):
20         super(ScenarioTestCase, self).setUp()
21         self.yardstick = utils.Yardstick()
22
23     def test_scenario_list(self):
24         res = self.yardstick("scenario list")
25
26         self.assertIn("Lmbench", res)
27         self.assertIn("Perf", res)
28         self.assertIn("Fio", res)
29         self.assertIn("Ping", res)
30         self.assertIn("Iperf3", res)
31         self.assertIn("Pktgen", res)
32
33     def test_scenario_show_Lmbench(self):
34         res = self.yardstick("scenario show Lmbench")
35         self.assertIn("Execute lmbench memory read latency or memory "
36                       "bandwidth benchmark in a hos", res)
37
38     def test_scenario_show_Perf(self):
39         res = self.yardstick("scenario show Perf")
40         self.assertIn("Execute perf benchmark in a host", res)
41
42     def test_scenario_show_Fio(self):
43         res = self.yardstick("scenario show Fio")
44         self.assertIn("Execute fio benchmark in a host", res)
45
46     def test_scenario_show_Ping(self):
47         res = self.yardstick("scenario show Ping")
48         self.assertIn("Execute ping between two hosts", res)
49
50     def test_scenario_show_Iperf3(self):
51         res = self.yardstick("scenario show Iperf3")
52         self.assertIn("Execute iperf3 between two hosts", res)
53
54     def test_scenario_show_Pktgen(self):
55         res = self.yardstick("scenario show Pktgen")
56         self.assertIn("Execute pktgen between two hosts", res)