def _check_skip(client: ContainerClient): if not is_env_not_false("SKIP_DOCKER_TESTS"): pytest.skip("SKIP_DOCKER_TESTS is set") if not client.has_docker(): pytest.skip("Docker is not available")
import re import traceback from abc import ABCMeta, abstractmethod from typing import NamedTuple import requests from six import add_metaclass from localstack import constants from localstack.config import DATA_DIR, is_env_not_false, is_env_true from localstack.services.generic_proxy import ProxyListener from localstack.utils.aws import aws_stack from localstack.utils.bootstrap import is_api_enabled from localstack.utils.common import to_bytes, to_str USE_SINGLE_DUMP_FILE = is_env_not_false("PERSISTENCE_SINGLE_FILE") if USE_SINGLE_DUMP_FILE: API_FILE_PATTERN = "{data_dir}/recorded_api_calls.json" else: API_FILE_PATTERN = "{data_dir}/api_calls_{api}.json" STARTUP_INFO_FILE = "startup_info.json" # Stack with flags to indicate whether we are currently re-playing API calls. # (We should not be re-playing and recording at the same time) CURRENTLY_REPLAYING = [] # file paths by API API_FILE_PATHS = {}
def _check_skip(): if not is_env_not_false("SKIP_DOCKER_TESTS"): pytest.skip("SKIP_DOCKER_TESTS is set") if not DOCKER_CLIENT.has_docker(): pytest.skip("Docker is not available")