summaryrefslogtreecommitdiff
path: root/test/units
diff options
context:
space:
mode:
authorMaugli <maugli13@gmail.com>2018-09-14 19:21:30 +0200
committerNilashish Chakraborty <nilashishchakraborty8@gmail.com>2018-09-14 22:51:30 +0530
commit235b11f681558c614b8b44e05d6679d48784a34c (patch)
tree6bfbac746f9220f55655319a639385c330312367 /test/units
parent829f48e3f5fe57783daf575906522dcc1836e66a (diff)
downloadansible-235b11f681558c614b8b44e05d6679d48784a34c.tar.gz
Return correct version on installed VyOS (#39115)
* Return correct version on installed VyOS Previously existing regexp will shows only "VyOS" without numeric output of router version. For example: from "Version: VyOS 1.1.6" only VyOS will be written in ansible_net_version variable For more informative output numeric value should be returned as well * Fixed unittests
Diffstat (limited to 'test/units')
-rw-r--r--test/units/modules/network/vyos/test_vyos_facts.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/units/modules/network/vyos/test_vyos_facts.py b/test/units/modules/network/vyos/test_vyos_facts.py
index 82a71fba31..4c421d80a3 100644
--- a/test/units/modules/network/vyos/test_vyos_facts.py
+++ b/test/units/modules/network/vyos/test_vyos_facts.py
@@ -63,7 +63,7 @@ class TestVyosFactsModule(TestVyosModule):
facts = result.get('ansible_facts')
self.assertEqual(len(facts), 5)
self.assertEqual(facts['ansible_net_hostname'].strip(), 'vyos01')
- self.assertEqual(facts['ansible_net_version'], 'VyOS')
+ self.assertEqual(facts['ansible_net_version'], 'VyOS 1.1.7')
def test_vyos_facts_not_all(self):
set_module_args(dict(gather_subset='!all'))
@@ -71,7 +71,7 @@ class TestVyosFactsModule(TestVyosModule):
facts = result.get('ansible_facts')
self.assertEqual(len(facts), 5)
self.assertEqual(facts['ansible_net_hostname'].strip(), 'vyos01')
- self.assertEqual(facts['ansible_net_version'], 'VyOS')
+ self.assertEqual(facts['ansible_net_version'], 'VyOS 1.1.7')
def test_vyos_facts_exclude_most(self):
set_module_args(dict(gather_subset=['!neighbors', '!config']))
@@ -79,7 +79,7 @@ class TestVyosFactsModule(TestVyosModule):
facts = result.get('ansible_facts')
self.assertEqual(len(facts), 5)
self.assertEqual(facts['ansible_net_hostname'].strip(), 'vyos01')
- self.assertEqual(facts['ansible_net_version'], 'VyOS')
+ self.assertEqual(facts['ansible_net_version'], 'VyOS 1.1.7')
def test_vyos_facts_invalid_subset(self):
set_module_args(dict(gather_subset='cereal'))