Example #1
0
def test_05_check_haproxy_cfg():
    """check if the second CDS was added to the HAProxy configuration file"""
    if not CDS2_EXISTS:
        raise nose.exc.SkipTest("The second CDS does not exist")
    nose.tools.ok_(Helpers.cds_in_haproxy_cfg(HAPROXY, CDS_HOSTNAMES[1]))
    # also check if the first one is still there
    nose.tools.ok_(Helpers.cds_in_haproxy_cfg(HAPROXY, CDS_HOSTNAMES[0]))
Example #2
0
def test_11_check_haproxy_cfg():
    """check if the first CDS was added to the HAProxy configuration file"""
    nose.tools.ok_(Helpers.cds_in_haproxy_cfg(HAPROXY, CDS_HOSTNAMES[0]))
Example #3
0
def test_09_check_haproxy_cfg():
    """check if the first CDS was deleted from the HAProxy configuration file"""
    nose.tools.ok_(not Helpers.cds_in_haproxy_cfg(HAPROXY, CDS_HOSTNAMES[0]))
Example #4
0
def test_07_check_haproxy_cfg():
    """check if the second CDS (and only it) was deleted from the HAProxy configuration file"""
    if not CDS2_EXISTS:
        raise nose.exc.SkipTest("The second CDS does not exist")
    nose.tools.ok_(not Helpers.cds_in_haproxy_cfg(HAPROXY, CDS_HOSTNAMES[1]))
    nose.tools.ok_(Helpers.cds_in_haproxy_cfg(HAPROXY, CDS_HOSTNAMES[0]))