Skip to content

Feature/appconfig data tests#182

Open
johnjedborn wants to merge 6 commits intomainfrom
feature/appconfig-data-tests
Open

Feature/appconfig data tests#182
johnjedborn wants to merge 6 commits intomainfrom
feature/appconfig-data-tests

Conversation

@johnjedborn
Copy link
Copy Markdown
Contributor

This pull request updates AWS SDK dependencies to use the latest compatible major versions and adds new test utilities for aws-sdk-appconfigdata. It also introduces comprehensive tests for the AppConfigData instrumentation middleware, improving reliability and test coverage.

Dependency updates:

  • Updated several AWS SDK dependencies in Cargo.toml (such as aws-sdk-s3, aws-sdk-sagemakerruntime, aws-sdk-secretsmanager, aws-sdk-ssm, and aws-sdk-appconfigdata) to use the latest compatible major version ("1"), making future upgrades easier and ensuring compatibility with the latest features and bug fixes.
  • Added aws-sdk-appconfigdata with the test-util feature and aws-smithy-mocks as dev-dependencies to support mocking AWS SDK clients in tests.

Testing improvements:

  • Added a new test module in src/middleware/aws/instrumentation/fluent_builder/appconfigdata.rs that uses aws-smithy-mocks to test the AppConfigData instrumentation middleware, including tests for start_configuration_session and attribute extraction from get_latest_configuration.

@johnjedborn johnjedborn requested review from a team as code owners March 9, 2026 05:53
Comment on lines +60 to +63
aws-config = { version = "=1.8.15", features = ["behavior-version-latest"] }
aws-sdk-appconfigdata = { version = "=1.96.0", features = ["test-util"] }
aws-sdk-dynamodb = "=1.108.0"
aws-smithy-mocks = "=0.2.6"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@johnjedborn any reason for pinning those?

Comment on lines +41 to +52
aws-types = { version = "=1.3.14", optional = true }
aws-smithy-async = { version = "=1.2.14", optional = true }
aws-smithy-types-convert = { version = "=0.60.14", features = ["convert-streams"], optional = true }
aws-sdk-dynamodb = { version = "=1.108.0", optional = true }
aws-sdk-firehose = { version = "=1.104.0", optional = true }
aws-sdk-sns = { version = "=1.97.0", optional = true }
aws-sdk-sqs = { version = "=1.96.0", optional = true }
aws-sdk-s3 = { version = "=1.125.0", optional = true }
aws-sdk-sagemakerruntime = { version = "=1.99.0", optional = true }
aws-sdk-secretsmanager = { version = "=1.102.0", optional = true }
aws-sdk-ssm = { version = "=1.107.0", optional = true }
aws-sdk-appconfigdata = { version = "=1.96.0", optional = true }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pinning dependencies here will make the crate unusable

use aws_smithy_mocks::{mock, mock_client};

#[tokio::test]
async fn start_configuration_session_instrument_send_accepts_no_arguments() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Those 2 tests do not look very useful to me.

They basically test the same contract we have in the type system.

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.

2 participants