Suite attributes for admin node tests

This commit is contained in:
nfedotov 2013-09-17 18:23:06 +04:00
parent fe44d31dde
commit 0ff4d905c9

View File

@ -17,6 +17,7 @@ import logging
import unittest import unittest
import xmlrpclib import xmlrpclib
from devops.helpers.helpers import wait, tcp_ping, http from devops.helpers.helpers import wait, tcp_ping, http
from nose.plugins.attrib import attr
from fuelweb_test.integration.base_test_case import BaseTestCase from fuelweb_test.integration.base_test_case import BaseTestCase
from fuelweb_test.integration.decorators import debug, fetch_logs from fuelweb_test.integration.decorators import debug, fetch_logs
from fuelweb_test.settings import CLEAN from fuelweb_test.settings import CLEAN
@ -31,6 +32,7 @@ class TestAdminNode(BaseTestCase):
self.ci().get_empty_environment() self.ci().get_empty_environment()
@logwrap @logwrap
@attr(suite='admin_node')
def test_puppetmaster_alive(self): def test_puppetmaster_alive(self):
wait( wait(
lambda: tcp_ping(self.get_admin_node_ip(), 8140), lambda: tcp_ping(self.get_admin_node_ip(), 8140),
@ -45,6 +47,7 @@ class TestAdminNode(BaseTestCase):
self.assertEquals(len(pm_processes), 4) self.assertEquals(len(pm_processes), 4)
@logwrap @logwrap
@attr(suite='admin_node')
def test_cobbler_alive(self): def test_cobbler_alive(self):
wait( wait(
lambda: http(host=self.get_admin_node_ip(), url='/cobbler_api', lambda: http(host=self.get_admin_node_ip(), url='/cobbler_api',
@ -58,6 +61,7 @@ class TestAdminNode(BaseTestCase):
@logwrap @logwrap
@fetch_logs @fetch_logs
@attr(suite='admin_node')
def test_nailyd_alive(self): def test_nailyd_alive(self):
ps_output = self.remote().execute('ps ax')['stdout'] ps_output = self.remote().execute('ps ax')['stdout']
naily_master = filter(lambda x: 'naily master' in x, ps_output) naily_master = filter(lambda x: 'naily master' in x, ps_output)