Fix vyos banner idempotent (#26338)

* fix vyos_banner idempotent

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix vyos_banner unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2017-07-03 13:08:08 +05:30 committed by GitHub
commit 1b427aa419
2 changed files with 9 additions and 8 deletions

View file

@ -44,10 +44,10 @@ class TestVyosBannerModule(TestVyosModule):
def test_vyos_banner_create(self):
set_module_args(dict(banner='pre-login', text='test\nbanner\nstring'))
commands = ['set system login banner pre-login "test\nbanner\nstring"']
commands = ["set system login banner pre-login 'test\nbanner\nstring'"]
self.execute_module(changed=True, commands=commands)
def test_vyos_banner_remove(self):
set_module_args(dict(banner='pre-login', state='absent'))
commands = ['delete system login banner pre-login']
self.execute_module(changed=True, commands=commands)
self.execute_module(changed=False, commands=[])