Skip to content

Commit 4dc5c11

Browse files
AMB-577 Mute smoke tests
1 parent 8160bc1 commit 4dc5c11

File tree

1 file changed

+54
-54
lines changed

1 file changed

+54
-54
lines changed

tests/api_tests.py

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
1-
from functools import partial
1+
# from functools import partial
22

3-
import pytest
4-
from aiohttp import ClientResponse
5-
from api_test_utils.api_session_client import APISessionClient
6-
from api_test_utils.api_test_session_config import APITestSessionConfig
7-
from api_test_utils import poll_until, env
3+
# import pytest
4+
# from aiohttp import ClientResponse
5+
# from api_test_utils.api_session_client import APISessionClient
6+
# from api_test_utils.api_test_session_config import APITestSessionConfig
7+
# from api_test_utils import poll_until, env
88

99

10-
async def _is_deployed(resp: ClientResponse, api_test_config: APITestSessionConfig) -> bool:
10+
# async def _is_deployed(resp: ClientResponse, api_test_config: APITestSessionConfig) -> bool:
1111

12-
if resp.status != 200:
13-
return False
14-
body = await resp.json()
12+
# if resp.status != 200:
13+
# return False
14+
# body = await resp.json()
1515

16-
return body.get("commitId") == api_test_config.commit_id
16+
# return body.get("commitId") == api_test_config.commit_id
1717

1818

19-
async def is_401(resp: ClientResponse) -> bool:
20-
return resp.status == 401
19+
# async def is_401(resp: ClientResponse) -> bool:
20+
# return resp.status == 401
2121

2222

23-
@pytest.mark.e2e
24-
@pytest.mark.smoketest
25-
def test_output_test_config(api_test_config: APITestSessionConfig):
26-
print(api_test_config)
23+
# @pytest.mark.e2e
24+
# @pytest.mark.smoketest
25+
# def test_output_test_config(api_test_config: APITestSessionConfig):
26+
# print(api_test_config)
2727

2828

29-
@pytest.mark.e2e
30-
@pytest.mark.smoketest
31-
@pytest.mark.asyncio
32-
async def test_wait_for_ping(api_client: APISessionClient, api_test_config: APITestSessionConfig):
33-
"""
34-
test for _ping .. this uses poll_until to wait until the correct SOURCE_COMMIT_ID ( from env var )
35-
is available
36-
"""
29+
# @pytest.mark.e2e
30+
# @pytest.mark.smoketest
31+
# @pytest.mark.asyncio
32+
# async def test_wait_for_ping(api_client: APISessionClient, api_test_config: APITestSessionConfig):
33+
# """
34+
# test for _ping .. this uses poll_until to wait until the correct SOURCE_COMMIT_ID ( from env var )
35+
# is available
36+
# """
3737

38-
is_deployed = partial(_is_deployed, api_test_config=api_test_config)
38+
# is_deployed = partial(_is_deployed, api_test_config=api_test_config)
3939

40-
await poll_until(
41-
make_request=lambda: api_client.get('_ping'),
42-
until=is_deployed,
43-
timeout=120
44-
)
40+
# await poll_until(
41+
# make_request=lambda: api_client.get('_ping'),
42+
# until=is_deployed,
43+
# timeout=120
44+
# )
4545

4646

47-
@pytest.mark.e2e
48-
@pytest.mark.smoketest
49-
@pytest.mark.asyncio
50-
async def test_check_status_is_secured(api_client: APISessionClient):
47+
# @pytest.mark.e2e
48+
# @pytest.mark.smoketest
49+
# @pytest.mark.asyncio
50+
# async def test_check_status_is_secured(api_client: APISessionClient):
5151

52-
await poll_until(
53-
make_request=lambda: api_client.get('_status'),
54-
until=is_401,
55-
timeout=120
56-
)
52+
# await poll_until(
53+
# make_request=lambda: api_client.get('_status'),
54+
# until=is_401,
55+
# timeout=120
56+
# )
5757

5858

59-
@pytest.mark.e2e
60-
@pytest.mark.smoketest
61-
@pytest.mark.asyncio
62-
async def test_wait_for_status(api_client: APISessionClient, api_test_config: APITestSessionConfig):
59+
# @pytest.mark.e2e
60+
# @pytest.mark.smoketest
61+
# @pytest.mark.asyncio
62+
# async def test_wait_for_status(api_client: APISessionClient, api_test_config: APITestSessionConfig):
6363

64-
"""
65-
test for _status .. this uses poll_until to wait until the correct SOURCE_COMMIT_ID ( from env var )
66-
is available
67-
"""
64+
# """
65+
# test for _status .. this uses poll_until to wait until the correct SOURCE_COMMIT_ID ( from env var )
66+
# is available
67+
# """
6868

69-
is_deployed = partial(_is_deployed, api_test_config=api_test_config)
69+
# is_deployed = partial(_is_deployed, api_test_config=api_test_config)
7070

71-
await poll_until(
72-
make_request=lambda: api_client.get('_status', headers={'apikey': env.status_endpoint_api_key()}),
73-
until=is_deployed,
74-
timeout=120
75-
)
71+
# await poll_until(
72+
# make_request=lambda: api_client.get('_status', headers={'apikey': env.status_endpoint_api_key()}),
73+
# until=is_deployed,
74+
# timeout=120
75+
# )

0 commit comments

Comments
 (0)