sefrone-api-e2e 1.4.4__tar.gz → 1.4.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/PKG-INFO +1 -1
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/1_normal_auth_flow.yaml +30 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/runner_mysql.py +0 -27
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/runner_postgresql.py +1 -25
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e.egg-info/PKG-INFO +1 -1
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/setup.py +1 -1
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/README.md +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/__init__.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/api_e2e_manager.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/0_check_features.yaml +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/2_account_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/3_admin_account_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/4_workspace_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/5_apikey_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/6_project_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/7_email_2fa_flow.yaml +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/8_temporary_passwords_flow.yaml +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/9_project_account_access_control_flow.yaml +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e/Scenarios/Auth/9a_email_identity_and_linked_projects_flow.yaml +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/e2e_scenarios_manager.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/env_patch.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/json_mock_server.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/runner_assets.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/runner_csv.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/runner_email_mock.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/runner_excel.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/runner_rest_api.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/runner_satim_mock.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/runner_webhook_mock.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e/step_runner.py +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e.egg-info/SOURCES.txt +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e.egg-info/dependency_links.txt +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e.egg-info/requires.txt +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e.egg-info/top_level.txt +0 -0
- {sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/setup.cfg +0 -0
|
@@ -23,8 +23,12 @@ steps:
|
|
|
23
23
|
login_token: "{{body.response.token}}"
|
|
24
24
|
login_project_id: "{{body.response.projectId}}"
|
|
25
25
|
login_token_expiry: "{{body.response.tokenExpiryDate}}"
|
|
26
|
+
login_account_type: "{{body.response.accountType}}"
|
|
26
27
|
|
|
28
|
+
# Only one of the two extend steps runs, depending on the type of DEFAULT_USERNAME's account.
|
|
27
29
|
- name: "Extend token expiry"
|
|
30
|
+
skip_if:
|
|
31
|
+
- "'{$stored.login_account_type}' == 'root'"
|
|
28
32
|
method: "POST"
|
|
29
33
|
endpoint: "/api/v1/apiAuth/token/extend"
|
|
30
34
|
request_headers:
|
|
@@ -45,6 +49,32 @@ steps:
|
|
|
45
49
|
- "{{body.response.token}} == '{$stored.login_token}'"
|
|
46
50
|
- "{{body.response.expiryDate}} > '{$stored.login_token_expiry}'"
|
|
47
51
|
|
|
52
|
+
# Root tokens are capped at one hour and /token/extend leaves their expiry unchanged. Login returns the
|
|
53
|
+
# expiry with an offset ("...+00:00") and extend without, so the check is that the login expiry still
|
|
54
|
+
# starts with the returned one.
|
|
55
|
+
- name: "Extend token expiry keeps a root token's expiry"
|
|
56
|
+
skip_if:
|
|
57
|
+
- "'{$stored.login_account_type}' != 'root'"
|
|
58
|
+
method: "POST"
|
|
59
|
+
endpoint: "/api/v1/apiAuth/token/extend"
|
|
60
|
+
request_headers:
|
|
61
|
+
- x-api-token: "{$stored.login_token}"
|
|
62
|
+
expect:
|
|
63
|
+
status: 200
|
|
64
|
+
body:
|
|
65
|
+
errorCode: number
|
|
66
|
+
errorCodeStr: string
|
|
67
|
+
message: string
|
|
68
|
+
response:
|
|
69
|
+
id: string
|
|
70
|
+
accountId: string
|
|
71
|
+
token: string
|
|
72
|
+
expiryDate: datetime
|
|
73
|
+
device: string
|
|
74
|
+
assertions:
|
|
75
|
+
- "{{body.response.token}} == '{$stored.login_token}'"
|
|
76
|
+
- "'{$stored.login_token_expiry}' include '{{body.response.expiryDate}}'"
|
|
77
|
+
|
|
48
78
|
- name: "Generate unique test suffix"
|
|
49
79
|
randomize:
|
|
50
80
|
seed_id: 8
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import time
|
|
2
1
|
from typing import Any, Dict, Optional
|
|
3
2
|
|
|
4
3
|
from sefrone_api_e2e import StepRunner, RunContext, StepResult
|
|
@@ -80,8 +79,6 @@ class MysqlRunner(StepRunner):
|
|
|
80
79
|
PackageManager.setup([("mysql-connector-python", "8.4.0")])
|
|
81
80
|
import mysql.connector
|
|
82
81
|
|
|
83
|
-
self._wait_for_db_ready()
|
|
84
|
-
|
|
85
82
|
def teardown(self) -> None:
|
|
86
83
|
pass # each execute() opens and closes its own short-lived connection.
|
|
87
84
|
|
|
@@ -221,27 +218,3 @@ class MysqlRunner(StepRunner):
|
|
|
221
218
|
"user": user,
|
|
222
219
|
"password": password,
|
|
223
220
|
}
|
|
224
|
-
|
|
225
|
-
def _wait_for_db_ready(self, timeout_seconds: int = 30) -> None:
|
|
226
|
-
deadline = time.time() + timeout_seconds
|
|
227
|
-
last_error: Optional[Exception] = None
|
|
228
|
-
while time.time() < deadline:
|
|
229
|
-
conn = None
|
|
230
|
-
try:
|
|
231
|
-
conn = mysql.connector.connect(**self._connect_kwargs)
|
|
232
|
-
cur = conn.cursor()
|
|
233
|
-
try:
|
|
234
|
-
cur.execute("SELECT 1")
|
|
235
|
-
finally:
|
|
236
|
-
cur.close()
|
|
237
|
-
print(f"[mysql] Database ready at {self._connect_kwargs['host']}:{self._connect_kwargs['port']}")
|
|
238
|
-
return
|
|
239
|
-
except Exception as e:
|
|
240
|
-
last_error = e
|
|
241
|
-
time.sleep(1)
|
|
242
|
-
finally:
|
|
243
|
-
if conn is not None:
|
|
244
|
-
conn.close()
|
|
245
|
-
raise RuntimeError(
|
|
246
|
-
f"[mysql] Database did not become ready within {timeout_seconds}s: {last_error}"
|
|
247
|
-
)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
from typing import Any, Dict, Optional
|
|
1
|
+
from typing import Any, Dict
|
|
3
2
|
|
|
4
3
|
from sefrone_api_e2e import StepRunner, RunContext, StepResult
|
|
5
4
|
|
|
@@ -79,8 +78,6 @@ class PostgresqlRunner(StepRunner):
|
|
|
79
78
|
import psycopg2
|
|
80
79
|
import psycopg2.extras
|
|
81
80
|
|
|
82
|
-
self._wait_for_db_ready()
|
|
83
|
-
|
|
84
81
|
def teardown(self) -> None:
|
|
85
82
|
pass # each execute() opens and closes its own short-lived connection.
|
|
86
83
|
|
|
@@ -197,24 +194,3 @@ class PostgresqlRunner(StepRunner):
|
|
|
197
194
|
}
|
|
198
195
|
except KeyError as e:
|
|
199
196
|
raise RuntimeError(f"[postgresql] Connection string missing expected key {e}: '{raw}'")
|
|
200
|
-
|
|
201
|
-
def _wait_for_db_ready(self, timeout_seconds: int = 30) -> None:
|
|
202
|
-
deadline = time.time() + timeout_seconds
|
|
203
|
-
last_error: Optional[Exception] = None
|
|
204
|
-
while time.time() < deadline:
|
|
205
|
-
conn = None
|
|
206
|
-
try:
|
|
207
|
-
conn = psycopg2.connect(**self._connect_kwargs)
|
|
208
|
-
with conn.cursor() as cur:
|
|
209
|
-
cur.execute("SELECT 1")
|
|
210
|
-
print(f"[postgresql] Database ready at {self._connect_kwargs['host']}:{self._connect_kwargs['port']}")
|
|
211
|
-
return
|
|
212
|
-
except Exception as e:
|
|
213
|
-
last_error = e
|
|
214
|
-
time.sleep(1)
|
|
215
|
-
finally:
|
|
216
|
-
if conn is not None:
|
|
217
|
-
conn.close()
|
|
218
|
-
raise RuntimeError(
|
|
219
|
-
f"[postgresql] Database did not become ready within {timeout_seconds}s: {last_error}"
|
|
220
|
-
)
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="sefrone_api_e2e",
|
|
8
|
-
version="1.4.
|
|
8
|
+
version="1.4.6",
|
|
9
9
|
author="Sefrone",
|
|
10
10
|
author_email="contact@sefrone.com",
|
|
11
11
|
description="A Python package to provide e2e testing helpers for sefrone API projects",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sefrone_api_e2e-1.4.4 → sefrone_api_e2e-1.4.6}/sefrone_api_e2e.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|