Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend bridge coverage for internalmetrics #21099

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion test/pytest/test_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,15 @@ async def test_internal_metrics(transport: MockTransport) -> None:
# cpu.core.user instances should be the same as meta sent instances
assert instances == len(data[0][0])
# all instances should be False, as this is a rate
assert not all(d for d in data[0][0])
assert all(d is False for d in data[0][0])
# memory.used should be an integer
assert isinstance(data[0][1], int)

# next data for rate should not be False
_, data = await transport.next_frame()
data = json.loads(data)
assert all(d is not False for d in data[0][0])


@pytest.mark.asyncio
async def test_fsread1_errors(transport: MockTransport) -> None:
Expand Down