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

Closed
jirutka wants to merge 1 commits 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
continuous-integration/drone/pr Build is passing Details
6468535a96
Include s3/website test only when k2v is enabled
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
All checks were successful
continuous-integration/drone/pr Build is passing
Required
Details

Pull request closed

Sign in to join this conversation.
No description provided.