Skip to content

Add integration tests for more clients - #136

Merged
kuhe merged 3 commits into
developfrom
kuhe/test/client-integrations
Nov 19, 2026
Merged

kuhe merged 3 commits into
developfrom
kuhe/test/client-integrations

Conversation

@kuhe

@kuhe kuhe commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Add a starter set of integration tests for clients.

@kuhe
kuhe force-pushed the kuhe/test/client-integrations branch from 1496661 to 518578d Compare November 16, 2026 14:41
@kuhe
kuhe force-pushed the kuhe/test/client-integrations branch from 518578d to 7ca7899 Compare November 16, 2026 14:47
@kuhe
kuhe added this pull request to stack #137 November 16, 2026 14:49
@kuhe
kuhe force-pushed the kuhe/test/client-integrations branch from 7ca7899 to 1cb1d7e Compare November 16, 2026 15:04
@kuhe
kuhe force-pushed the kuhe/test/client-integrations branch from 1cb1d7e to e7cab44 Compare November 16, 2026 20:16
@kuhe
kuhe force-pushed the kuhe/test/client-integrations branch from e7cab44 to 2ecf829 Compare November 16, 2026 20:44
@kuhe
kuhe force-pushed the kuhe/test/client-integrations branch 2 times, most recently from b0a3124 to d07e900 Compare November 17, 2026 15:28
@kuhe
kuhe force-pushed the kuhe/test/client-integrations branch from d07e900 to da52444 Compare November 17, 2026 16:17
Base automatically changed from kuhe/test/integrations to develop November 17, 2026 17:05
@kuhe
kuhe force-pushed the kuhe/test/client-integrations branch 4 times, most recently from d24f607 to fde4495 Compare November 17, 2026 19:10
@kuhe
kuhe marked this pull request as ready for review November 17, 2026 21:11
@kuhe
kuhe requested a review from a team as a code owner November 17, 2026 21:11
stobrien89
stobrien89 previously approved these changes Nov 17, 2026
@jonathan343

Copy link
Copy Markdown
Contributor

Sorry, you now have to rebase after we merged #152

sts: AsyncSTSClient,
) -> None:
"""Verifies the environment credential chain signs a request that STS accepts and identifies."""
identity = await sts.get_caller_identity(GetCallerIdentityInput())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - I think we should start using the await sts.get_caller_identity() instead of await sts.get_caller_identity(GetCallerIdentityInput()) mostly because agents and people will copy what they see in the codebase. The later is cleaner and requires no additional import.

from .conftest import STSFactory


async def test_get_caller_identity_resolves_environment_credentials(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I'm missing something, but I don't get how this is checking that we resolve from environment credentials?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this is wrong. I'm removing this test because aws-credentials-sts has the default chain ordering test which covers this.



@pytest.mark.skip(
reason="TODO: ClientRequestToken is not auto-filled by smithy-core 0.10; needs the idempotency-token fill from smithy-python #913"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be good now right? I think there are a few of these we could stop skipping

@jonathan343 jonathan343 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more minor comments

Comment on lines +40 to +41
if marker is None and len(names) < 2:
pytest.skip("account has fewer than two functions to paginate over")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our account that runs these tests has no lambda functions, so this will always get skipped I think

token = page.next_token
if token is None:
break
assert pages >= 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even when there is not pagination, this will always return true since we have a pages += 1 directly after.

async def test_stream_is_active_on_demand(
kinesis: AsyncKinesisClient, stream: str
) -> None:
"""Verifies the shared stream reports ON_DEMAND mode, ACTIVE status, and its tags."""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - tags aren't checked like the docstring says.

Suggested change
"""Verifies the shared stream reports ON_DEMAND mode, ACTIVE status, and its tags."""
"""Verifies the shared stream reports ON_DEMAND mode and ACTIVE status."""

interval=2,
timeout=60,
)
assert [g.group_id for g in by_tag.security_groups or []] == [security_group]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment from my robot 🤖:

This tag:Stage filter is account-wide. Any leftover or parallel group tagged Stage=alpha will break this equality check. Can we add a group-id filter, or assert security_group in ... instead?

Might run into this since multiple builds run in parallel when we open multiple PRs at a similar time.

@kuhe
kuhe merged commit 4e8ebac into develop Nov 19, 2026
5 checks passed
@kuhe
kuhe deleted the kuhe/test/client-integrations branch November 19, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants