Include s3/website test only when k2v is enabled #556

Closed
jirutka wants to merge 1 commit from jirutka/garage:fix-website-test-k2v into main
Contributor

It depends on k2v feature, so fails to build when k2v is disabled.

It depends on k2v feature, so fails to build when k2v is disabled.
jirutka added 1 commit 2023-04-29 23:05:30 +00:00
Include s3/website test only when k2v is enabled
All checks were successful
continuous-integration/drone/pr Build is passing
6468535a96
It depends on k2v feature, so fails to build when k2v is disabled.

I don't think any of these tests depends on k2v. What error are you getting?

I don't think any of these tests depends on k2v. What error are you getting?
Author
Contributor

1ecd88c01f/src/garage/tests/s3/website.rs:

use crate::k2v::json_body;
https://git.deuxfleurs.fr/Deuxfleurs/garage/src/commit/1ecd88c01f0857139921214a264128e5639e31db/src/garage/tests/s3/website.rs: ```rs use crate::k2v::json_body; ```

hum, that function isn't specific to k2v, it's currently in :/garage/src/garage/tests/k2v/mod.rs, but its place should probably be :/garage/src/garage/tests/lib.rs instead. That would fix your issue, and not disable some tests when they could be enabled

hum, that function isn't specific to k2v, it's currently in `:/garage/src/garage/tests/k2v/mod.rs`, but its place should probably be `:/garage/src/garage/tests/lib.rs` instead. That would fix your issue, and not disable some tests when they could be enabled
Author
Contributor

BTW, the error message is this:

$ cargo test --no-default-features --features system-libs,sled
...
   Compiling garage v0.8.2
error[E0432]: unresolved import `crate::k2v`
 --> src/garage/tests/s3/website.rs:3:12
  |
3 | use crate::k2v::json_body;
  |            ^^^ could not find `k2v` in the crate root
BTW, the error message is this: ``` $ cargo test --no-default-features --features system-libs,sled ... Compiling garage v0.8.2 error[E0432]: unresolved import `crate::k2v` --> src/garage/tests/s3/website.rs:3:12 | 3 | use crate::k2v::json_body; | ^^^ could not find `k2v` in the crate root ```
lx requested changes 2023-05-09 08:50:34 +00:00
lx left a comment
Owner

See the comment of @trinity-1686a : the json_body function needs to be moved, not the entire module disabled.

See the comment of @trinity-1686a : the `json_body` function needs to be moved, not the entire module disabled.
Owner

Fixed in #619

Fixed in #619
lx closed this pull request 2023-08-28 11:13:46 +00:00
Some checks are pending
continuous-integration/drone/pr Build is passing
ci/woodpecker/pr/debug
Required

Pull request closed

Sign in to join this conversation.
No reviewers
lx
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#556
No description provided.