⚡ Waypoint start time #4172
GitHub Actions / JUnit Test Report
failed
Oct 24, 2024 in 0s.
View latest attempt.
835 tests run, 827 passed, 6 skipped, 2 failed.
Annotations
Check failure on line 60 in waypoint/tests/services/test_nats_service.py
github-actions / JUnit Test Report
test_nats_service.test_nats_events_processor_subscribe
AssertionError: expected call not found.
Expected: pull_subscribe(subject='cloudapi.aries.events.group_id.wallet_id', stream='cloudapi_aries_events')
Actual: pull_subscribe(config=ConsumerConfig(name=None, durable_name=None, description=None, deliver_policy=<DeliverPolicy.BY_START_TIME: 'by_start_time'>, opt_start_seq=None, opt_start_time='2024-10-24T10:01:49.797Z', ack_policy=<AckPolicy.EXPLICIT: 'explicit'>, ack_wait=None, max_deliver=None, backoff=None, filter_subject=None, filter_subjects=None, replay_policy=<ReplayPolicy.INSTANT: 'instant'>, rate_limit_bps=None, sample_freq=None, max_waiting=None, max_ack_pending=None, flow_control=None, idle_heartbeat=None, headers_only=None, deliver_subject=None, deliver_group=None, inactive_threshold=None, num_replicas=None, mem_storage=None, metadata=None), subject='cloudapi.aries.events.group_id.wallet_id', stream='cloudapi_aries_events')
pytest introspection follows:
Kwargs:
assert {'config': Co...id.wallet_id'} == {'stream': 'c...id.wallet_id'}
Omitting 2 identical items, use -vv to show
Left contains 1 more item:
{'config': ConsumerConfig(name=None,
durable_name=None,
description=None,
deliver_policy=<DeliverPolicy.BY_START_TIME: 'by_start_time'>,...
...Full output truncated (23 lines hidden), use '-vv' to show
Raw output
self = <AsyncMock name='connect().jetstream().pull_subscribe' id='140303932982240'>
args = ()
kwargs = {'stream': 'cloudapi_aries_events', 'subject': 'cloudapi.aries.events.group_id.wallet_id'}
expected = call(subject='cloudapi.aries.events.group_id.wallet_id', stream='cloudapi_aries_events')
actual = call(config=ConsumerConfig(name=None, durable_name=None, description=None, deliver_policy=<DeliverPolicy.BY_START_TIME..., mem_storage=None, metadata=None), subject='cloudapi.aries.events.group_id.wallet_id', stream='cloudapi_aries_events')
_error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7f9b0e1d7560>
cause = None
def assert_called_with(self, /, *args, **kwargs):
"""assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
different to the last call to the mock."""
if self.call_args is None:
expected = self._format_mock_call_signature(args, kwargs)
actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\n Actual: %s'
% (expected, actual))
raise AssertionError(error_message)
def _error_message():
msg = self._format_mock_failure_message(args, kwargs)
return msg
expected = self._call_matcher(_Call((args, kwargs), two=True))
actual = self._call_matcher(self.call_args)
if actual != expected:
cause = expected if isinstance(expected, Exception) else None
> raise AssertionError(_error_message()) from cause
E AssertionError: expected call not found.
E Expected: pull_subscribe(subject='cloudapi.aries.events.group_id.wallet_id', stream='cloudapi_aries_events')
E Actual: pull_subscribe(config=ConsumerConfig(name=None, durable_name=None, description=None, deliver_policy=<DeliverPolicy.BY_START_TIME: 'by_start_time'>, opt_start_seq=None, opt_start_time='2024-10-24T10:01:49.797Z', ack_policy=<AckPolicy.EXPLICIT: 'explicit'>, ack_wait=None, max_deliver=None, backoff=None, filter_subject=None, filter_subjects=None, replay_policy=<ReplayPolicy.INSTANT: 'instant'>, rate_limit_bps=None, sample_freq=None, max_waiting=None, max_ack_pending=None, flow_control=None, idle_heartbeat=None, headers_only=None, deliver_subject=None, deliver_group=None, inactive_threshold=None, num_replicas=None, mem_storage=None, metadata=None), subject='cloudapi.aries.events.group_id.wallet_id', stream='cloudapi_aries_events')
/usr/local/lib/python3.12/unittest/mock.py:949: AssertionError
During handling of the above exception, another exception occurred:
self = <AsyncMock name='connect().jetstream().pull_subscribe' id='140303932982240'>
args = ()
kwargs = {'stream': 'cloudapi_aries_events', 'subject': 'cloudapi.aries.events.group_id.wallet_id'}
def assert_called_once_with(self, /, *args, **kwargs):
"""assert that the mock was called exactly once and that that call was
with the specified arguments."""
if not self.call_count == 1:
msg = ("Expected '%s' to be called once. Called %s times.%s"
% (self._mock_name or 'mock',
self.call_count,
self._calls_repr()))
raise AssertionError(msg)
> return self.assert_called_with(*args, **kwargs)
E AssertionError: expected call not found.
E Expected: pull_subscribe(subject='cloudapi.aries.events.group_id.wallet_id', stream='cloudapi_aries_events')
E Actual: pull_subscribe(config=ConsumerConfig(name=None, durable_name=None, description=None, deliver_policy=<DeliverPolicy.BY_START_TIME: 'by_start_time'>, opt_start_seq=None, opt_start_time='2024-10-24T10:01:49.797Z', ack_policy=<AckPolicy.EXPLICIT: 'explicit'>, ack_wait=None, max_deliver=None, backoff=None, filter_subject=None, filter_subjects=None, replay_policy=<ReplayPolicy.INSTANT: 'instant'>, rate_limit_bps=None, sample_freq=None, max_waiting=None, max_ack_pending=None, flow_control=None, idle_heartbeat=None, headers_only=None, deliver_subject=None, deliver_group=None, inactive_threshold=None, num_replicas=None, mem_storage=None, metadata=None), subject='cloudapi.aries.events.group_id.wallet_id', stream='cloudapi_aries_events')
E
E pytest introspection follows:
E
E Kwargs:
E assert {'config': Co...id.wallet_id'} == {'stream': 'c...id.wallet_id'}
E
E Omitting 2 identical items, use -vv to show
E Left contains 1 more item:
E {'config': ConsumerConfig(name=None,
E durable_name=None,
E description=None,
E deliver_policy=<DeliverPolicy.BY_START_TIME: 'by_start_time'>,...
E
E ...Full output truncated (23 lines hidden), use '-vv' to show
/usr/local/lib/python3.12/unittest/mock.py:961: AssertionError
During handling of the above exception, another exception occurred:
mock_nats_client = <AsyncMock name='connect().jetstream()' spec='JetStreamContext' id='140304035193840'>
@pytest.mark.anyio
async def test_nats_events_processor_subscribe(
mock_nats_client, # pylint: disable=redefined-outer-name
):
processor = NatsEventsProcessor(mock_nats_client)
mock_nats_client.pull_subscribe.return_value = AsyncMock(
spec=JetStreamContext.PullSubscription
)
subscription = await processor._subscribe( # pylint: disable=protected-access
"group_id", "wallet_id"
)
> mock_nats_client.pull_subscribe.assert_called_once_with(
subject=f"{NATS_SUBJECT}.group_id.wallet_id", stream=NATS_STREAM
)
E AssertionError: expected call not found.
E Expected: pull_subscribe(subject='cloudapi.aries.events.group_id.wallet_id', stream='cloudapi_aries_events')
E Actual: pull_subscribe(config=ConsumerConfig(name=None, durable_name=None, description=None, deliver_policy=<DeliverPolicy.BY_START_TIME: 'by_start_time'>, opt_start_seq=None, opt_start_time='2024-10-24T10:01:49.797Z', ack_policy=<AckPolicy.EXPLICIT: 'explicit'>, ack_wait=None, max_deliver=None, backoff=None, filter_subject=None, filter_subjects=None, replay_policy=<ReplayPolicy.INSTANT: 'instant'>, rate_limit_bps=None, sample_freq=None, max_waiting=None, max_ack_pending=None, flow_control=None, idle_heartbeat=None, headers_only=None, deliver_subject=None, deliver_group=None, inactive_threshold=None, num_replicas=None, mem_storage=None, metadata=None), subject='cloudapi.aries.events.group_id.wallet_id', stream='cloudapi_aries_events')
E
E pytest introspection follows:
E
E Kwargs:
E assert {'config': Co...id.wallet_id'} == {'stream': 'c...id.wallet_id'}
E
E Omitting 2 identical items, use -vv to show
E Left contains 1 more item:
E {'config': ConsumerConfig(name=None,
E durable_name=None,
E description=None,
E deliver_policy=<DeliverPolicy.BY_START_TIME: 'by_start_time'>,...
E
E ...Full output truncated (23 lines hidden), use '-vv' to show
waypoint/tests/services/test_nats_service.py:60: AssertionError
Check failure on line 85 in app/tests/e2e/test_did_rotate.py
github-actions / JUnit Test Report
test_did_rotate.test_hangup_did_rotation[clean-clean]
fastapi.exceptions.HTTPException: 500: {"detail":"Internal Server Error"}
Raw output
self = <shared.util.rich_async_client.RichAsyncClient object at 0x7f5a03ffc590>
url = '/v1/connections/did-rotate/hangup'
kwargs = {'params': {'connection_id': '85ffc7bb-8096-4ef7-bb9c-66afeab7d458'}}
response = <Response [500 Internal Server Error]>, code = 500
message = '{"detail":"Internal Server Error"}'
log_message = 'Tenant alice_ZPASI - HTTP POST `/v1/connections/did-rotate/hangup` failed. Status code: 500. Response: `{"detail":"Internal Server Error"}`.'
async def post(self, url: str, **kwargs) -> Response:
try:
response = await super().post(url, **kwargs)
if self.raise_status_error:
> response.raise_for_status() # Raise exception for 4xx and 5xx status codes
shared/util/rich_async_client.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [500 Internal Server Error]>
def raise_for_status(self) -> Response:
"""
Raise the `HTTPStatusError` if one occurred.
"""
request = self._request
if request is None:
raise RuntimeError(
"Cannot call `raise_for_status` as the request "
"instance has not been set on this response."
)
if self.is_success:
return self
if self.has_redirect_location:
message = (
"{error_type} '{0.status_code} {0.reason_phrase}' for url '{0.url}'\n"
"Redirect location: '{0.headers[location]}'\n"
"For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/{0.status_code}"
)
else:
message = (
"{error_type} '{0.status_code} {0.reason_phrase}' for url '{0.url}'\n"
"For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/{0.status_code}"
)
status_class = self.status_code // 100
error_types = {
1: "Informational response",
3: "Redirect response",
4: "Client error",
5: "Server error",
}
error_type = error_types.get(status_class, "Invalid status code")
message = message.format(self, error_type=error_type)
> raise HTTPStatusError(message, request=request, response=self)
E httpx.HTTPStatusError: Server error '500 Internal Server Error' for url 'https://governance-tenant-web.cloudapi.dev.didxtech.com/tenant/v1/connections/did-rotate/hangup?connection_id=85ffc7bb-8096-4ef7-bb9c-66afeab7d458'
E For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500
/usr/local/lib/python3.12/site-packages/httpx/_models.py:763: HTTPStatusError
The above exception was the direct cause of the following exception:
alice_member_client = <shared.util.rich_async_client.RichAsyncClient object at 0x7f5a03ffc590>
faber_client = <shared.util.rich_async_client.RichAsyncClient object at 0x7f5a03f5aed0>
faber_acapy_client = <aries_cloudcontroller.acapy_client.AcaPyClient object at 0x7f5a03ffdf40>
@pytest.mark.anyio
async def test_hangup_did_rotation(
alice_member_client: RichAsyncClient,
faber_client: RichAsyncClient,
faber_acapy_client: AcaPyClient,
):
# First, create did-exchange connections between Alice and Faber:
faber_public_did = await acapy_wallet.get_public_did(controller=faber_acapy_client)
request_data = {"their_public_did": qualified_did_sov(faber_public_did.did)}
response = await alice_member_client.post(
f"{CONNECTIONS_BASE_PATH}/did-exchange/create-request", params=request_data
)
connection_record = response.json()
alice_connection_id = connection_record["connection_id"]
alice_did = connection_record["my_did"]
assert await check_webhook_state(
alice_member_client,
topic="connections",
state="completed",
filter_map={"connection_id": alice_connection_id},
)
faber_event = await check_webhook_state(
faber_client,
topic="connections",
state="completed",
filter_map={"their_did": alice_did},
)
faber_connection_id = faber_event["connection_id"]
# Hangup the DID rotation
> hangup_response = await alice_member_client.post(
f"{CONNECTIONS_BASE_PATH}/did-rotate/hangup",
params={"connection_id": alice_connection_id},
)
app/tests/e2e/test_did_rotate.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <shared.util.rich_async_client.RichAsyncClient object at 0x7f5a03ffc590>
url = '/v1/connections/did-rotate/hangup'
kwargs = {'params': {'connection_id': '85ffc7bb-8096-4ef7-bb9c-66afeab7d458'}}
response = <Response [500 Internal Server Error]>, code = 500
message = '{"detail":"Internal Server Error"}'
log_message = 'Tenant alice_ZPASI - HTTP POST `/v1/connections/did-rotate/hangup` failed. Status code: 500. Response: `{"detail":"Internal Server Error"}`.'
async def post(self, url: str, **kwargs) -> Response:
try:
response = await super().post(url, **kwargs)
if self.raise_status_error:
response.raise_for_status() # Raise exception for 4xx and 5xx status codes
except HTTPStatusError as e:
code = e.response.status_code
message = e.response.text
log_message = f"{self.name} POST `{url}` failed. Status code: {code}. Response: `{message}`."
logger.error(log_message)
> raise HTTPException(status_code=code, detail=message) from e
E fastapi.exceptions.HTTPException: 500: {"detail":"Internal Server Error"}
shared/util/rich_async_client.py:40: HTTPException
Loading