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

test: Meta transaction deserialization #58

Merged
merged 7 commits into from Feb 23, 2023
Merged

Conversation

morgsmccauley
Copy link
Contributor

@morgsmccauley morgsmccauley commented Feb 21, 2023

This PR introduces tests for s3_fetchers, with the goal of testing the deserialization of meta transactions. It does this by creating a new trait to abstract away aws_sdk_s3::Client providing the ability to inject fake implementations which have mock S3 responses.

I've also added another step to the existing github action which will run the tests.

};

#[async_trait]
pub trait GetObject {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@morgsmccauley morgsmccauley force-pushed the feat/meta-transaction branch 2 times, most recently from 3c41f86 to 2c69bac Compare February 21, 2023 21:11
@morgsmccauley morgsmccauley marked this pull request as draft February 21, 2023 22:24
Copy link
Member

@khorolets khorolets left a comment

Choose a reason for hiding this comment

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

I've committed changes that fix the errors preventing us from moving on.

Left a few comments with my concerns.

src/lib.rs Show resolved Hide resolved
src/s3_fetchers.rs Outdated Show resolved Hide resolved
src/s3_fetchers.rs Show resolved Hide resolved
Base automatically changed from feat/meta-transaction to main February 22, 2023 19:21
async-stream = "0.3.3"

[dev-dependencies]
aws-smithy-http = "0.53.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed for constructing an S3 response body via SdkBody

@morgsmccauley morgsmccauley marked this pull request as ready for review February 23, 2023 03:12
@morgsmccauley
Copy link
Contributor Author

@khorolets this is ready for review now. Thanks a lot for you help!

Copy link
Member

@khorolets khorolets left a comment

Choose a reason for hiding this comment

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

Looks good overall. I've left a few change requests and we're good to go.

Cargo.toml Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/s3_fetchers.rs Outdated Show resolved Hide resolved
src/s3_fetchers.rs Show resolved Hide resolved
src/s3_fetchers.rs Show resolved Hide resolved
Copy link
Member

@khorolets khorolets left a comment

Choose a reason for hiding this comment

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

Great job!

@morgsmccauley morgsmccauley merged commit a9a5579 into main Feb 23, 2023
@morgsmccauley morgsmccauley deleted the test/meta-transactions branch February 23, 2023 18:37
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.

None yet

2 participants