def test_11_add_cds_uppercase(): ''' add (and delete) a CDS with uppercase characters ''' # for RHBZ#1572623 # choose a random CDS hostname from the list cds_up = random.choice(CDS_HOSTNAMES).replace("cds", "CDS") RHUIManagerInstance.add_instance(RHUA, "cds", cds_up) cds_list = RHUIManagerInstance.list(RHUA, "cds") nose.tools.assert_equal(len(cds_list), 1) RHUIManagerInstance.delete(RHUA, "cds", [cds_up]) cds_list = RHUIManagerInstance.list(RHUA, "cds") nose.tools.assert_equal(len(cds_list), 0)
def test_12_delete_unreachable(): ''' add a CDS, make it unreachable, and see if it can still be deleted from the RHUA ''' # for RHBZ#1639996 # choose a random CDS hostname from the list cds = random.choice(CDS_HOSTNAMES) RHUIManagerInstance.add_instance(RHUA, "cds", cds) cds_list = RHUIManagerInstance.list(RHUA, "cds") nose.tools.assert_not_equal(cds_list, []) Helpers.break_hostname(RHUA, cds) # delete it RHUIManagerInstance.delete(RHUA, "cds", [cds]) # check it cds_list = RHUIManagerInstance.list(RHUA, "cds") nose.tools.assert_equal(cds_list, []) Helpers.unbreak_hostname(RHUA) # the node remains configured (RHUI mount point, httpd)... unconfigure it properly RHUIManagerInstance.add_instance(RHUA, "cds", cds) RHUIManagerInstance.delete(RHUA, "cds", [cds])
def test_08_delete_first_cds(): """[TUI] delete the first CDS""" RHUIManagerInstance.delete(RHUA, "cds", [CDS_HOSTNAMES[0]])
def test_06_delete_second_cds(): """[TUI] delete the second CDS""" if not CDS2_EXISTS: raise nose.exc.SkipTest("The second CDS does not exist") RHUIManagerInstance.delete(RHUA, "cds", [CDS_HOSTNAMES[1]])
def test_99_cleanup(): """delete the HAProxy Load-balancer""" RHUIManagerInstance.delete(RHUA, "loadbalancers", [HA_HOSTNAME]) # also clean up the SSH keys (if left behind) ConMgr.remove_ssh_keys(RHUA)