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)
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)
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)