Add generated Q Business client and integration tests#54
Open
Alan4506 wants to merge 1 commit intoawslabs:developfrom
Open
Add generated Q Business client and integration tests#54Alan4506 wants to merge 1 commit intoawslabs:developfrom
Alan4506 wants to merge 1 commit intoawslabs:developfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes:
This PR adds integration tests for the Q Business service client (
aws-sdk-qbusiness), covering the following:chat_syncchatThe test structure and patterns follow the same conventions established in the Lex Runtime V2 integration tests (PR #51), including session-scoped conftest fixtures for resource setup/teardown and field-level assertions on event types.
Although the PR contains many files, most of them are generated by smithy-python codegen. Please mainly review the integration tests because they are the primary focus of this PR. The Smithy model, generated client code under
src/, andpyproject.tomlare included for reviewer convenience so that tests can be run locally. The actual client release will be handled by internal release automation (through a separate PR that uploads the model).Here is the detailed file breakdown:
codegen/aws-models/qbusiness.json: Smithy model for the Q Business service.clients/aws-sdk-qbusiness/src/: Generated client code. Included for reviewer convenience only; will be replaced by release automation.clients/aws-sdk-qbusiness/pyproject.toml: Generated package configuration.clients/aws-sdk-qbusiness/README.md: Generated package readme.clients/aws-sdk-qbusiness/tests/__init__.py: Generated test package marker.clients/aws-sdk-qbusiness/tests/test_protocol.py: Generated protocol test.clients/aws-sdk-qbusiness/tests/integration/__init__.py: DefinesREGIONandcreate_qbusiness_client()helper shared across integration tests.clients/aws-sdk-qbusiness/tests/integration/conftest.py: Session-scoped pytest fixture that creates a Q Business application, index, and retriever using boto3, and tears them down after. Uses custom botocore waiters since Q Business has no built-in boto3 waiters.clients/aws-sdk-qbusiness/tests/integration/test_non_streaming.py: Tests thechat_syncoperation.clients/aws-sdk-qbusiness/tests/integration/test_bidirectional_streaming.py: Tests thechatoperation.Note: The Q Business client cannot be code-generated without the codegen fix in smithy-lang/smithy-python#682, which is still under review.
Note: The Q Business service sends event types (
intermediateMessageEvent,intermediateGroupEvent) that are not present in the current model. These are handled asChatOutputStreamUnknownthanks to a fix insmithy-python. The changes have been merged into the develop branch but have not been released yet. Tests will fail against the published PyPI versions until the next release.To successfully run the tests locally, follow the steps below:
All tests should pass.
This branch will be rebased once the release automation publishes the client.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.