diff --git a/fuelweb_test/helpers/fuel_actions.py b/fuelweb_test/helpers/fuel_actions.py index cfc33b65c..a5adf666c 100644 --- a/fuelweb_test/helpers/fuel_actions.py +++ b/fuelweb_test/helpers/fuel_actions.py @@ -483,6 +483,22 @@ class FuelPluginBuilder(BaseActions): )['stdout_str'] return packet_name + def fpb_update_release_in_metadata(self, path): + """Update fuel version and openstack release version + + :param path: path to plugin's dir on master node + """ + metadata_path = os.path.join(path, 'metadata.yaml') + output = self.ssh_manager.execute_on_remote( + ip=self.admin_ip, cmd="fuel --fuel-version --json", + jsonify=True)['stdout_json'] + fuel_version = [str(output['release'])] + openstack_version = str(output['openstack_version']) + self.change_remote_yaml(metadata_path, ['fuel_version'], fuel_version) + releases = self.get_value_from_remote_yaml(metadata_path, ['releases']) + releases[0]['version'] = openstack_version + self.put_value_to_remote_yaml(metadata_path, ['releases'], releases) + def fpb_validate_plugin(self, path): """ Validates plugin for errors diff --git a/fuelweb_test/tests/plugins/plugin_reboot/test_plugin_reboot_task.py b/fuelweb_test/tests/plugins/plugin_reboot/test_plugin_reboot_task.py index b1f845343..13c10b3f0 100644 --- a/fuelweb_test/tests/plugins/plugin_reboot/test_plugin_reboot_task.py +++ b/fuelweb_test/tests/plugins/plugin_reboot/test_plugin_reboot_task.py @@ -68,6 +68,7 @@ class RebootPlugin(TestBasic): # create plugin template on the master node self.show_step(3) fpb.fpb_create_plugin(source_plugin_path) + fpb.fpb_update_release_in_metadata(source_plugin_path) # replace plugin tasks with our file fpb.fpb_replace_plugin_content( os.path.join(tasks_path, tasks_file), @@ -199,6 +200,7 @@ class RebootPlugin(TestBasic): self.show_step(3) # create plugin template on the master node fpb.fpb_create_plugin(source_plugin_path) + fpb.fpb_update_release_in_metadata(source_plugin_path) # replace plugin tasks with our file fpb.fpb_replace_plugin_content( os.path.join('/tmp/', tasks_file),