def configure_package(configure_security):
    try:
        sdk_install.uninstall(config.PACKAGE_NAME, SERVICE_NAME)
        yield  # let the test session execute
    finally:
        sdk_install.uninstall(config.PACKAGE_NAME, SERVICE_NAME)
        sdk_marathon.delete_group(group_id=ENFORCED_ROLE)
Exemple #2
0
def configure_package(configure_security):
    try:
        sdk_install.uninstall(config.PACKAGE_NAME, SERVICE_NAME)
        sdk_marathon.delete_group(group_id=ENFORCED_ROLE)
        # create group with enforced-roles
        sdk_marathon.create_group(group_id=ENFORCED_ROLE, options={"enforceRole": False})
        yield  # let the test session execute
    finally:
        sdk_install.uninstall(config.PACKAGE_NAME, SERVICE_NAME)
        sdk_marathon.delete_group(group_id=ENFORCED_ROLE)
Exemple #3
0
def create_group(group, enforce_group):
    log.info("Creating group '{}' with enforceGroup='{}'".format(
        group, enforce_group))

    try:
        sdk_marathon.delete_group(group)
        sdk_marathon.create_group(group,
                                  options={"enforceRole": enforce_group})
        yield
    finally:
        sdk_marathon.delete_group(group)