mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fixed unit test comments for haproxy module
This commit is contained in:
parent
a7b507377b
commit
14b492b5b4
@ -18,7 +18,6 @@ from tests.support.mock import (
|
|||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
import salt.modules.haproxyconn as haproxyconn
|
import salt.modules.haproxyconn as haproxyconn
|
||||||
|
|
||||||
|
|
||||||
class Mockcmds(object):
|
class Mockcmds(object):
|
||||||
"""
|
"""
|
||||||
Mock of cmds
|
Mock of cmds
|
||||||
@ -112,7 +111,7 @@ class HaproxyConnTestCase(TestCase, LoaderModuleMockMixin):
|
|||||||
|
|
||||||
def test_list_servers(self, mock):
|
def test_list_servers(self, mock):
|
||||||
'''
|
'''
|
||||||
Test if it get a value from etcd, by direct path
|
Test list_servers
|
||||||
'''
|
'''
|
||||||
self.assertTrue(haproxyconn.list_servers('mysql'))
|
self.assertTrue(haproxyconn.list_servers('mysql'))
|
||||||
|
|
||||||
@ -120,7 +119,7 @@ class HaproxyConnTestCase(TestCase, LoaderModuleMockMixin):
|
|||||||
|
|
||||||
def test_enable_server(self, mock):
|
def test_enable_server(self, mock):
|
||||||
'''
|
'''
|
||||||
Test if it get a value from etcd, by direct path
|
Test enable_server
|
||||||
'''
|
'''
|
||||||
self.assertTrue(haproxyconn.enable_server('web1.salt.com', 'www'))
|
self.assertTrue(haproxyconn.enable_server('web1.salt.com', 'www'))
|
||||||
|
|
||||||
@ -128,7 +127,7 @@ class HaproxyConnTestCase(TestCase, LoaderModuleMockMixin):
|
|||||||
|
|
||||||
def test_disable_server(self, mock):
|
def test_disable_server(self, mock):
|
||||||
'''
|
'''
|
||||||
Test if it get a value from etcd, by direct path
|
Test disable_server
|
||||||
'''
|
'''
|
||||||
self.assertTrue(haproxyconn.disable_server('db1.salt.com', 'mysql'))
|
self.assertTrue(haproxyconn.disable_server('db1.salt.com', 'mysql'))
|
||||||
|
|
||||||
@ -136,7 +135,7 @@ class HaproxyConnTestCase(TestCase, LoaderModuleMockMixin):
|
|||||||
|
|
||||||
def test_get_weight(self, mock):
|
def test_get_weight(self, mock):
|
||||||
'''
|
'''
|
||||||
Test if it get a value from etcd, by direct path
|
Test get the weight of a server
|
||||||
'''
|
'''
|
||||||
self.assertTrue(haproxyconn.get_weight('db1.salt.com', 'mysql'))
|
self.assertTrue(haproxyconn.get_weight('db1.salt.com', 'mysql'))
|
||||||
|
|
||||||
@ -144,7 +143,7 @@ class HaproxyConnTestCase(TestCase, LoaderModuleMockMixin):
|
|||||||
|
|
||||||
def test_set_weight(self, mock):
|
def test_set_weight(self, mock):
|
||||||
'''
|
'''
|
||||||
Test if it get a value from etcd, by direct path
|
Test setting the weight of a given server
|
||||||
'''
|
'''
|
||||||
self.assertTrue(haproxyconn.set_weight('db1.salt.com', 'mysql',
|
self.assertTrue(haproxyconn.set_weight('db1.salt.com', 'mysql',
|
||||||
weight=11))
|
weight=11))
|
||||||
@ -153,7 +152,7 @@ class HaproxyConnTestCase(TestCase, LoaderModuleMockMixin):
|
|||||||
|
|
||||||
def test_show_frontends(self, mock):
|
def test_show_frontends(self, mock):
|
||||||
'''
|
'''
|
||||||
Test if it get a value from etcd, by direct path
|
Test print all frontends received from the HAProxy socket
|
||||||
'''
|
'''
|
||||||
self.assertTrue(haproxyconn.show_frontends())
|
self.assertTrue(haproxyconn.show_frontends())
|
||||||
|
|
||||||
@ -161,6 +160,6 @@ class HaproxyConnTestCase(TestCase, LoaderModuleMockMixin):
|
|||||||
|
|
||||||
def test_show_backends(self, mock):
|
def test_show_backends(self, mock):
|
||||||
'''
|
'''
|
||||||
Test if it get a value from etcd, by direct path
|
Test print all backends received from the HAProxy socket
|
||||||
'''
|
'''
|
||||||
self.assertTrue(haproxyconn.show_backends())
|
self.assertTrue(haproxyconn.show_backends())
|
||||||
|
Loading…
Reference in New Issue
Block a user