diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_apex_deploy_settings.py | 3 | ||||
-rw-r--r-- | tests/test_apex_inventory.py | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/tests/test_apex_deploy_settings.py b/tests/test_apex_deploy_settings.py index 2af187b2..a0af1211 100644 --- a/tests/test_apex_deploy_settings.py +++ b/tests/test_apex_deploy_settings.py @@ -22,7 +22,8 @@ deploy_files = ('deploy_settings.yaml', 'os-nosdn-nofeature-noha.yaml', 'os-nosdn-ovs-noha.yaml', 'os-ocl-nofeature-ha.yaml', - 'os-odl_l2-sdnvpn-ha.yaml', + 'os-odl_l2-bgpvpn-ha.yaml', + 'os-odl_l2-bgpvpn-noha.yaml', 'os-odl_l3-nofeature-ha.yaml', 'os-nosdn-nofeature-ha.yaml', 'os-nosdn-ovs-ha.yaml', diff --git a/tests/test_apex_inventory.py b/tests/test_apex_inventory.py index 08a34152..ec75856b 100644 --- a/tests/test_apex_inventory.py +++ b/tests/test_apex_inventory.py @@ -7,12 +7,16 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import sys + from apex.inventory import Inventory from apex.inventory import InventoryException from nose.tools import assert_is_instance from nose.tools import assert_raises from nose.tools import assert_equal +from nose.tools import assert_regexp_matches +from io import StringIO inventory_files = ('intel_pod2_settings.yaml', 'nokia_pod1_settings.yaml', @@ -59,3 +63,19 @@ class TestInventory(object): e = InventoryException("test") print(e) assert_is_instance(e, InventoryException) + + def test_dump_bash_default(self): + i = Inventory('../config/inventory/intel_pod2_settings.yaml') + out = StringIO() + sys.stdout = out + i.dump_bash() + output = out.getvalue().strip() + assert_regexp_matches(output, 'root_disk_list=sda') + + def test_dump_bash_set_root_device(self): + i = Inventory('../config/inventory/pod_example_settings.yaml') + out = StringIO() + sys.stdout = out + i.dump_bash() + output = out.getvalue().strip() + assert_regexp_matches(output, 'root_disk_list=sdb') |