Skip to content

Commit e998b33

Browse files
authored
test: rename cloud_only marker as access_tokens (#32)
1 parent e912cb6 commit e998b33

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ jobs:
7272
"ref": "${{ github.ref }}",
7373
"lang": "python",
7474
"uv-version": "0.11.3",
75-
"test_cmd": "uv run pytest tests/ -v -s -m '(account or basin or stream) and not cloud_only'"
75+
"test_cmd": "uv run pytest tests/ -v -s -m '(account or basin or stream) and not access_tokens'"
7676
}
7777
]

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ markers =
1717
basin: tests for basin operations
1818
stream: tests for stream operations
1919
metrics: tests for metrics operations
20-
cloud_only: tests that require s2-cloud (not supported on s2-lite)
20+
access_tokens: tests for access token operations

tests/test_account_ops.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ async def test_list_basins_with_prefix(self, s2: S2, basin_name: str):
134134
finally:
135135
await s2.delete_basin(basin_name)
136136

137-
@pytest.mark.cloud_only
137+
@pytest.mark.access_tokens
138138
async def test_issue_access_token(self, s2: S2, token_id: str, basin_prefix: str):
139139
scope = AccessTokenScope(
140140
basins=PrefixMatch(basin_prefix),
@@ -153,7 +153,7 @@ async def test_issue_access_token(self, s2: S2, token_id: str, basin_prefix: str
153153
finally:
154154
await s2.revoke_access_token(token_id)
155155

156-
@pytest.mark.cloud_only
156+
@pytest.mark.access_tokens
157157
async def test_issue_access_token_with_expiry(self, s2: S2, token_id: str):
158158
expires_at = datetime.now(timezone.utc) + timedelta(hours=1)
159159

@@ -182,7 +182,7 @@ async def test_issue_access_token_with_expiry(self, s2: S2, token_id: str):
182182
finally:
183183
await s2.revoke_access_token(token_id)
184184

185-
@pytest.mark.cloud_only
185+
@pytest.mark.access_tokens
186186
async def test_issue_access_token_with_auto_prefix(self, s2: S2, token_id: str):
187187
scope = AccessTokenScope(
188188
streams=PrefixMatch("prefix/"),
@@ -210,11 +210,11 @@ async def test_issue_access_token_with_auto_prefix(self, s2: S2, token_id: str):
210210
finally:
211211
await s2.revoke_access_token(token_id)
212212

213-
@pytest.mark.cloud_only
214213
async def test_get_basin_config(self, s2: S2, basin: S2Basin):
215214
config = await s2.get_basin_config(basin.name)
216-
assert config is not None
217-
assert config.default_stream_config is not None
215+
assert isinstance(config, BasinConfig)
216+
assert config.create_stream_on_append is False
217+
assert config.create_stream_on_read is False
218218

219219
async def test_delete_nonexistent_basin_errors(self, s2: S2):
220220
with pytest.raises(S2ServerError):
@@ -241,7 +241,7 @@ async def test_list_basins_with_prefix_and_start_after(
241241
for basin_info in basin_infos:
242242
await s2.delete_basin(basin_info.name)
243243

244-
@pytest.mark.cloud_only
244+
@pytest.mark.access_tokens
245245
async def test_list_access_tokens_with_limit(self, s2: S2, token_id: str):
246246
scope = AccessTokenScope(
247247
streams=PrefixMatch(""),
@@ -255,7 +255,7 @@ async def test_list_access_tokens_with_limit(self, s2: S2, token_id: str):
255255
finally:
256256
await s2.revoke_access_token(token_id)
257257

258-
@pytest.mark.cloud_only
258+
@pytest.mark.access_tokens
259259
async def test_list_access_tokens_with_prefix(self, s2: S2, token_id: str):
260260
scope = AccessTokenScope(
261261
streams=PrefixMatch(""),
@@ -270,7 +270,7 @@ async def test_list_access_tokens_with_prefix(self, s2: S2, token_id: str):
270270
finally:
271271
await s2.revoke_access_token(token_id)
272272

273-
@pytest.mark.cloud_only
273+
@pytest.mark.access_tokens
274274
async def test_issue_access_token_with_no_permitted_ops_errors(
275275
self, s2: S2, token_id: str
276276
):
@@ -279,7 +279,7 @@ async def test_issue_access_token_with_no_permitted_ops_errors(
279279
with pytest.raises(S2ServerError):
280280
await s2.issue_access_token(id=token_id, scope=scope)
281281

282-
@pytest.mark.cloud_only
282+
@pytest.mark.access_tokens
283283
async def test_issue_access_token_with_auto_prefix_without_prefix_errors(
284284
self, s2: S2, token_id: str
285285
):

0 commit comments

Comments
 (0)