Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
ARIA-209 Fix create-archive CLI command help
  • Loading branch information
Ran Ziv committed May 4, 2017
1 parent 8ca3ff2 commit 85539771c09ec34126fd03960ac3d242f226ddeb
Showing 2 changed files with 8 additions and 7 deletions.
@@ -182,20 +182,21 @@ def validate(service_template, service_template_filename,


@service_templates.command(name='create-archive',
short_help='Create a csar archive')
short_help='Create a CSAR archive')
@aria.argument('service-template-path')
@aria.argument('destination')
@aria.options.verbose()
@aria.pass_logger
def create_archive(service_template_path, destination, logger):
"""Create a csar archive
"""Create a csar archive on the local file system
`service_template_path` is the path of the service template to create the archive from
`destination` is the path of the output csar archive
`destination` is the path of the output CSAR archive file
"""
logger.info('Creating a csar archive')
logger.info('Creating a CSAR archive')
csar.write(os.path.dirname(service_template_path), service_template_path, destination, logger)
logger.info('Csar archive created at {0}'.format(destination))
logger.info('CSAR archive created at {0}'.format(destination))


def print_service_template_inputs(model_storage, service_template_name, logger):
@@ -238,9 +238,9 @@ def test_header_string(self, monkeypatch, mock_storage):

monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
self.invoke('service_templates create_archive stubpath stubdest')
assert 'Creating a csar archive' in self.logger_output_string
assert 'Creating a CSAR archive' in self.logger_output_string

def test_create_archive_successful(self, monkeypatch, mock_object):
monkeypatch.setattr(csar, 'write', mock_object)
self.invoke('service_templates create_archive stubpath stubdest')
assert 'Csar archive created at stubdest' in self.logger_output_string
assert 'CSAR archive created at stubdest' in self.logger_output_string

0 comments on commit 8553977

Please sign in to comment.