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

Remove s3-server and dependencies #150

Merged
merged 11 commits into from
Feb 6, 2023
Merged

Remove s3-server and dependencies #150

merged 11 commits into from
Feb 6, 2023

Conversation

brainstorm
Copy link
Member

Fixes #131

@brainstorm brainstorm marked this pull request as ready for review February 2, 2023 00:15
Copy link
Member

@mmalenic mmalenic left a comment

Choose a reason for hiding this comment

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

I don't think this code actually runs the tests, and they haven't been running for a while, as the test closure is never awaited! 😮 (my bad!)

This would be a good one for clippy or rustc to lint! It could be a bug, because Future is labelled with must_use.

With the changes to actually get the tests to run, the following tests are currently failing:

storage::aws::tests::url_of_existing_key
storage::aws::tests::url_of_non_existing_key
storage::aws::tests::url_with_specified_open_ended_range
storage::aws::tests::url_with_specified_range

url_of_existing_key, url_with_specified_open_ended_range and url_with_specified_range should be easy to fix as they just need an adjustment url.starts_with assertion.

For example, changing:

assert!(result
  .url
  .starts_with(&format!("http://localhost:8014/{}/{}", "folder", "key2")));

to:

assert!(result
  .url
  .starts_with(&format!("http://folder.localhost:8014/{}", "key2")));

And the byte ranges from bytes=7-9 to bytes=7-8 for url_with_specified_range should fix them.

However, url_of_non_existing_key might need a bit more investigation.

htsget-search/src/storage/aws.rs Outdated Show resolved Hide resolved
htsget-search/src/storage/aws.rs Outdated Show resolved Hide resolved
htsget-search/src/storage/aws.rs Outdated Show resolved Hide resolved
htsget-search/src/storage/aws.rs Outdated Show resolved Hide resolved
@brainstorm brainstorm merged commit 766fbc0 into main Feb 6, 2023
@mmalenic mmalenic mentioned this pull request Feb 7, 2023
@brainstorm brainstorm deleted the s3-server-to-s3s branch February 7, 2023 23:27
@github-actions github-actions bot mentioned this pull request May 4, 2023
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.

Mock S3 tests instead of using s3-server
2 participants