Skip to content

Commit

Permalink
♻️ Maintenance/remove pytest docker storage (#3011)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg authored Apr 29, 2022
1 parent 10618a4 commit 122703f
Show file tree
Hide file tree
Showing 17 changed files with 203 additions and 509 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Config:
schema_extra = {
"examples": [
{
"url": "s3://some_file_url",
"url": "https://some_file_url",
},
{"url": "s3://some_file_url", "file_mapping": "some_file_name.txt"},
]
Expand Down Expand Up @@ -124,7 +124,7 @@ class Config(DictModel.Config):
"string_output": {"required": False},
"file_output": {
"required": True,
"url": "s3://some_file_url",
"url": "https://some_file_url",
"mapping": "the_output_filename",
},
"optional_file_output": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def assert_status(
async def assert_error(
response: ClientResponse,
expected_cls: Type[HTTPException],
expected_msg: str = None,
expected_msg: Optional[str] = None,
):
data, error = unwrap_envelope(await response.json())
return do_assert_error(data, error, expected_cls, expected_msg)
Expand All @@ -66,7 +66,7 @@ def do_assert_error(
data,
error,
expected_cls: Type[HTTPException],
expected_msg: str = None,
expected_msg: Optional[str] = None,
expected_error_code: Optional[str] = None,
):
assert not data, pformat(data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ def postgres_engine(postgres_dsn: Dict[str, str]) -> Iterator[sa.engine.Engine]:
engine.dispose()


@pytest.fixture(scope="module")
def postgres_dsn_url(postgres_dsn: Dict[str, str]) -> str:
return "postgresql://{user}:{password}@{host}:{port}/{database}".format(
**postgres_dsn
)


@pytest.fixture(scope="module")
def postgres_db(
postgres_dsn: Dict[str, str],
Expand Down
1 change: 0 additions & 1 deletion services/storage/requirements/_test.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
pytest
pytest-aiohttp # incompatible with pytest-asyncio. See https://github.com/pytest-dev/pytest-asyncio/issues/76
pytest-cov
pytest-docker
pytest-icdiff
pytest-instafail
pytest-mock
Expand Down
63 changes: 3 additions & 60 deletions services/storage/requirements/_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,11 @@ attrs==20.3.0
# via
# -c requirements/_base.txt
# aiohttp
# jsonschema
# pytest
# pytest-docker
bcrypt==3.2.0
# via paramiko
certifi==2021.10.8
# via
# -c requirements/_base.txt
# requests
cffi==1.15.0
# via
# bcrypt
# cryptography
# pynacl
charset-normalizer==2.0.12
# via
# -c requirements/_base.txt
Expand All @@ -52,26 +43,11 @@ coverage==6.3.2
# pytest-cov
coveralls==3.3.1
# via -r requirements/_test.in
cryptography==36.0.2
# via
# -c requirements/../../../requirements/constraints.txt
# paramiko
dill==0.3.4
# via pylint
distro==1.7.0
# via docker-compose
docker==5.0.3
# via docker-compose
docker-compose==1.29.1
# via
# -c requirements/../../../requirements/constraints.txt
# pytest-docker
dockerpty==0.4.1
# via docker-compose
docopt==0.6.2
# via
# coveralls
# docker-compose
# via coveralls
faker==13.3.3
# via -r requirements/_test.in
frozenlist==1.3.0
Expand All @@ -90,10 +66,6 @@ iniconfig==1.1.1
# via pytest
isort==5.10.1
# via pylint
jsonschema==3.2.0
# via
# -c requirements/_base.txt
# docker-compose
lazy-object-proxy==1.4.3
# via
# -c requirements/_base.txt
Expand All @@ -113,8 +85,6 @@ packaging==21.3
# pytest-sugar
pandas==1.4.1
# via -r requirements/_test.in
paramiko==2.10.3
# via docker
platformdirs==2.5.1
# via pylint
pluggy==1.0.0
Expand All @@ -125,25 +95,16 @@ ptvsd==4.3.2
# via -r requirements/_test.in
py==1.11.0
# via pytest
pycparser==2.21
# via cffi
pylint==2.13.2
# via -r requirements/_test.in
pynacl==1.5.0
# via paramiko
pyparsing==3.0.7
# via packaging
pyrsistent==0.18.1
# via
# -c requirements/_base.txt
# jsonschema
pytest==7.1.1
# via
# -r requirements/_test.in
# pytest-aiohttp
# pytest-asyncio
# pytest-cov
# pytest-docker
# pytest-icdiff
# pytest-instafail
# pytest-mock
Expand All @@ -154,8 +115,6 @@ pytest-asyncio==0.18.3
# via pytest-aiohttp
pytest-cov==3.0.0
# via -r requirements/_test.in
pytest-docker==0.11.0
# via -r requirements/_test.in
pytest-icdiff==0.5
# via -r requirements/_test.in
pytest-instafail==0.4.2
Expand All @@ -172,35 +131,21 @@ python-dateutil==2.8.2
# faker
# pandas
python-dotenv==0.20.0
# via
# -r requirements/_test.in
# docker-compose
# via -r requirements/_test.in
pytz==2022.1
# via pandas
pyyaml==5.4.1
# via
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_base.txt
# docker-compose
requests==2.27.1
# via
# codecov
# coveralls
# docker
# docker-compose
six==1.16.0
# via
# -c requirements/_base.txt
# bcrypt
# dockerpty
# jsonschema
# paramiko
# python-dateutil
# websocket-client
termcolor==1.1.0
# via pytest-sugar
texttable==1.6.4
# via docker-compose
tomli==2.0.1
# via
# coverage
Expand All @@ -217,9 +162,7 @@ urllib3==1.26.9
# -c requirements/_base.txt
# requests
websocket-client==0.59.0
# via
# docker
# docker-compose
# via docker
wrapt==1.14.0
# via
# -c requirements/_base.txt
Expand Down
1 change: 0 additions & 1 deletion services/storage/requirements/_tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ pyyaml==5.4.1
# via
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_base.txt
# -c requirements/_test.txt
# pre-commit
# watchdog
six==1.16.0
Expand Down
Loading

0 comments on commit 122703f

Please sign in to comment.