Exemple #1
0
    default='docker',
    help='Name of driver to initialize. (docker)')
@click.option(
    '--lint-name',
    type=click.Choice(['yamllint']),
    default='yamllint',
    help='Name of lint to initialize. (yamllint)')
@click.option(
    '--provisioner-name',
    type=click.Choice(['ansible']),
    default='ansible',
    help='Name of provisioner to initialize. (ansible)')
@click.option('--role-name', required=True, help='Name of the role to create.')
@click.option(
    '--verifier-name',
    type=click.Choice(config.molecule_verifiers()),
    default='testinfra',
    help='Name of verifier to initialize. (testinfra)')
def role(dependency_name, driver_name, lint_name, provisioner_name, role_name,
         verifier_name):  # pragma: no cover
    """ Initialize a new role for use with Molecule. """
    command_args = {
        'dependency_name': dependency_name,
        'driver_name': driver_name,
        'lint_name': lint_name,
        'provisioner_name': provisioner_name,
        'role_name': role_name,
        'scenario_name': 'default',
        'subcommand': __name__,
        'verifier_name': verifier_name,
    }
Exemple #2
0
def test_molecule_verifiers():
    x = ['goss', 'testinfra']

    assert x == config.molecule_verifiers()
Exemple #3
0
def test_molecule_verifiers():
    x = ['goss', 'inspec', 'testinfra', 'ansible']

    assert x == config.molecule_verifiers()
Exemple #4
0
def test_molecule_verifiers():
    x = ['goss', 'testinfra']

    assert x == config.molecule_verifiers()
Exemple #5
0
    help='Name of driver to initialize. (docker)')
@click.option(
    '--lint-name',
    type=click.Choice(['yamllint']),
    default='yamllint',
    help='Name of lint to initialize. (yamllint)')
@click.option(
    '--provisioner-name',
    type=click.Choice(['ansible']),
    default='ansible',
    help='Name of provisioner to initialize. (ansible)')
@click.option(
    '--role-name', '-r', required=True, help='Name of the role to create.')
@click.option(
    '--verifier-name',
    type=click.Choice(config.molecule_verifiers()),
    default='testinfra',
    help='Name of verifier to initialize. (testinfra)')
def role(ctx, dependency_name, driver_name, lint_name, provisioner_name,
         role_name, verifier_name):  # pragma: no cover
    """ Initialize a new role for use with Molecule. """
    command_args = {
        'dependency_name': dependency_name,
        'driver_name': driver_name,
        'lint_name': lint_name,
        'provisioner_name': provisioner_name,
        'role_name': role_name,
        'scenario_name': 'default',
        'subcommand': __name__,
        'verifier_name': verifier_name,
    }