Skip to content

Commit 6f52950

Browse files
Merge remote-tracking branch 'origin/main' into feat/issue57-connected-generations
2 parents 4bb78db + 72fe408 commit 6f52950

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎SHA256SUMS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ ccf713c70a2902a282f3bf8066a7a37621c4c6ce289f24bc4111d79eae4b3dce tests/test_js_
879879
81eb096a52543546e82fb8fa6a330611871b31b2078daf4baac458828afbe431 tests/test_lifecycle_v11.py
880880
5119c287af542a2214b5e0fbde8eb5a705023729d6cc3d4672eddd8c59015a05 tests/test_monitoring_v12.py
881881
18b3d771f5f6bd8d1c0a42ac8550e930367cb1dc8524f372fbcf1afa30614a4b tests/test_native_runner_contract.py
882-
2461885f73a341abb5769310a72d085302ba041f3966edfad94d3b26fe24e1d3 tests/test_node_template_connected.py
882+
5c4f8b003330373c7cd1c87d1b8fcfb8a77c7806b76f7d36a20c0cdfd2da0a90 tests/test_node_template_connected.py
883883
72df152510d1cf7345eed8987ed36c69cebcd97c02cff7da249fe2cfde16f1a4 tests/test_node_template_installation.py
884884
5135c544dc94930eb7f5beadc6025bf6627330853957b483e0ac9ac72c4ed168 tests/test_node_template_installed_cli_formats.py
885885
8fdb4211a7680d964d1dfbdaa07705dde712475bf45c29b00296cda0cd1fd429 tests/test_node_template_installed_commonjs.py

‎tests/test_node_template_connected.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Installed CommonJS connected-shadow protocol with an offline typed transport."""
22
from __future__ import annotations
33

4+
from datetime import datetime, timedelta, timezone
45
import hashlib
56
import json
67
import os
@@ -32,6 +33,11 @@
3233
)
3334

3435

36+
def _utc(offset: timedelta) -> str:
37+
"""Fixture grant and scope times relative to this run, never a fixed date."""
38+
return (datetime.now(timezone.utc) + offset).strftime('%Y-%m-%dT%H:%M:%SZ')
39+
40+
3541
PROJECT = Path(__file__).resolve().parents[1]
3642

3743

@@ -224,7 +230,7 @@ def invoke(*args, ok=True):
224230
grant = {'core_sha256': digest(core), 'mode': 'shadow',
225231
'endpoint': request['endpoint'], 'credential_ref': request['credential_ref'],
226232
'model': request['model'], 'environment_digest': env_digest,
227-
'issued_at': '2026-09-28T00:00:00Z', 'expires_at': '2026-10-01T00:00:00Z'}
233+
'issued_at': _utc(timedelta(days=-1)), 'expires_at': _utc(timedelta(days=1))}
228234
request['egress_grant'] = grant
229235
request_file = tmp_path / 'connected-request.json'
230236
request_file.write_text(json.dumps(request), encoding='utf-8')
@@ -263,7 +269,7 @@ def invoke(*args, ok=True):
263269
'reference': 'offline-connected-fixture', 'run_id': created_status['run_id'],
264270
'plan_sha256': descriptor['descriptor_sha256'],
265271
'trusted_session_head': created_status['session_head_sha256'],
266-
'expires_at': '2026-10-01T00:00:00Z', 'revoked': False,
272+
'expires_at': _utc(timedelta(days=1)), 'revoked': False,
267273
'grants': {'launch': True, 'stop': True, 'disable': True,
268274
'rollback': False, 'upgrade': False}}
269275
scope['scope_sha256'] = digest(scope)

0 commit comments

Comments
 (0)