File tasks.yaml made optional for V4 plugins

Plugin developers don't need to have tasks.yaml any more.

Change-Id: Ieff19c5a1d8f9a647076afdf2b4028e96be1ce7e
Closes-Bug: #1552248
This commit is contained in:
Alexander Kislitsky 2016-03-10 17:07:59 +03:00
parent 6fcb352940
commit a22bc32ee8
3 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,5 @@
# WARNING: `tasks.yaml` will be deprecated in further releases.
# Please, use `deployment_tasks.yaml` to describe tasks istead.
# Please, use `deployment_tasks.yaml` to describe tasks instead.
# This tasks will be applied on controller nodes,
# here you can also specify several roles, for example

View File

@ -424,3 +424,11 @@ class TestValidatorV4(TestValidatorV3):
@mock.patch('fuel_plugin_builder.validators.validator_v4.utils')
def test_check_tasks_schema_validation_passed(self, utils_mock, *args):
pass
@mock.patch('fuel_plugin_builder.validators.base.utils.exists')
def test_check_tasks_schema_validation_no_file(self, exists_mock, *args):
mocked_methods = ['validate_schema']
self.mock_methods(self.validator, mocked_methods)
exists_mock.return_value = False
self.validator.check_tasks_schema()
self.assertFalse(self.validator.validate_schema.called)

View File

@ -47,6 +47,7 @@ class ValidatorV4(ValidatorV3):
self.validate_file_by_schema(
self.schema.tasks_schema,
self.tasks_path,
allow_not_exists=True,
allow_empty=True
)