Fix fuel-agent ci gate test
Fixed invalid network provider in test_review_in_fuel_agent Add full_pack_path to for avoiding of situations with the incorrect naming of fuel-agent rpm package Change-Id: Idf28ee751166f570f352f9423af6e0cd7e896382
This commit is contained in:
parent
b445e7c217
commit
cee8f4eb8b
|
@ -33,6 +33,7 @@ def replace_fuel_agent_rpm(environment):
|
|||
raise exceptions.FuelQAVariableNotSet('UPDATE_FUEL', 'True')
|
||||
try:
|
||||
pack_path = '/var/www/nailgun/fuel-agent/'
|
||||
full_pack_path = os.path.join(pack_path, '*.rpm')
|
||||
container = 'mcollective'
|
||||
with environment.d_env.get_admin_remote() as remote:
|
||||
remote.upload(settings.UPDATE_FUEL_PATH.rstrip('/'),
|
||||
|
@ -43,15 +44,14 @@ def replace_fuel_agent_rpm(environment):
|
|||
old_package = \
|
||||
environment.base_actions.execute_in_container(
|
||||
cmd, container, exit_code=0)
|
||||
cmd = "ls -1 {0}|grep 'fuel-agent'".format(pack_path)
|
||||
cmd = "rpm -qp {0}".format(full_pack_path)
|
||||
new_package = \
|
||||
environment.base_actions.execute_in_container(
|
||||
cmd, container).rstrip('.rpm')
|
||||
cmd, container)
|
||||
logger.info("Updating package {0} with {1}"
|
||||
.format(old_package, new_package))
|
||||
|
||||
cmd = "rpm -Uvh --oldpackage {0}fuel-agent*.rpm".format(
|
||||
pack_path)
|
||||
cmd = "rpm -Uvh --oldpackage {0}".format(full_pack_path)
|
||||
environment.base_actions.execute_in_container(
|
||||
cmd, container, exit_code=0)
|
||||
|
||||
|
@ -65,9 +65,10 @@ def replace_fuel_agent_rpm(environment):
|
|||
format(new_package))
|
||||
|
||||
# Update fuel-agent on master node
|
||||
cmd = "rpm -Uvh --oldpackage {0}fuel-agent*.rpm".format(
|
||||
pack_path)
|
||||
result = remote.execute(cmd)
|
||||
with environment.d_env.get_admin_remote() as remote:
|
||||
cmd = "rpm -Uvh --oldpackage {0}".format(
|
||||
full_pack_path)
|
||||
result = remote.execute(cmd)
|
||||
assert_equal(result['exit_code'], 0,
|
||||
('Failed to update package {}').format(result))
|
||||
|
||||
|
|
|
@ -14,14 +14,11 @@
|
|||
|
||||
from proboscis import test
|
||||
|
||||
# from gates_tests.helpers.utils import patch_centos_bootstrap
|
||||
# from gates_tests.helpers.utils import replace_centos_bootstrap
|
||||
from gates_tests.helpers.utils import patch_and_assemble_ubuntu_bootstrap
|
||||
from gates_tests.helpers.utils import replace_fuel_agent_rpm
|
||||
|
||||
from fuelweb_test.helpers.decorators import log_snapshot_after_test
|
||||
from fuelweb_test.helpers.utils import run_on_remote
|
||||
from fuelweb_test.settings import NEUTRON_SEGMENT_TYPE
|
||||
from fuelweb_test.settings import OPENSTACK_RELEASE
|
||||
from fuelweb_test.tests.base_test_case import TestBasic
|
||||
|
||||
|
@ -61,11 +58,6 @@ class Gate(TestBasic):
|
|||
replace_fuel_agent_rpm(self.env)
|
||||
|
||||
self.show_step(3)
|
||||
# Uncomment when use CentOS bootstrap by default
|
||||
# patch_centos_bootstrap(self.env)
|
||||
# replace_centos_bootstrap(self.env)
|
||||
|
||||
# Comment and disable when use CentOS bootstrap by default
|
||||
patch_and_assemble_ubuntu_bootstrap(self.env)
|
||||
|
||||
self.show_step(4)
|
||||
|
@ -78,9 +70,8 @@ class Gate(TestBasic):
|
|||
self.show_step(5)
|
||||
with self.env.d_env.get_admin_remote() as remote:
|
||||
cmd = ('fuel env create --name={0} --release={1} '
|
||||
'--nst={2} --json'.format(self.__class__.__name__,
|
||||
release_id,
|
||||
NEUTRON_SEGMENT_TYPE))
|
||||
'--nst=tun --json'.format(self.__class__.__name__,
|
||||
release_id))
|
||||
env_result = run_on_remote(remote, cmd, jsonify=True)
|
||||
cluster_id = env_result['id']
|
||||
|
||||
|
|
Loading…
Reference in New Issue