Git Product home page Git Product logo

Comments (9)

chmln avatar chmln commented on June 2, 2024 1

@mweinelt I've already added testing in e8d014c soon after you opened the issue :)

from handlr.

chmln avatar chmln commented on June 2, 2024

@mweinelt Hey thanks for letting me know!

Something must be off because tests are passing for me locally. Will look into this.
image

from handlr.

mweinelt avatar mweinelt commented on June 2, 2024

We are running this in a sandboxed environment, so it could be related to that.

from handlr.

chmln avatar chmln commented on June 2, 2024

@mweinelt I suspect it could be due to missing/bare mime db as handlr relies on shared mime info.

If you're running this in a Docker container, feel free to share the image you're using and I'll try debugging that.

from handlr.

mweinelt avatar mweinelt commented on June 2, 2024

It is a nix package, so you'd need nix to test this yourself.

https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/handlr/default.nix

The maintainer disabled the tests for this reason. The sandbox only has a barebones standard environment and the locked cargo dependencies.

I could imagine your tests rely on something like shared-mime-info, I'm giving this a shot.

from handlr.

mweinelt avatar mweinelt commented on June 2, 2024

And indeed, two more tests work after adding shared-mime-info during testing. So I kinda expect handlr needs that database at runtime as well?

running 5 tests
test common::desktop_entry::tests::complex_exec ... ok
test apps::user::tests::wildcard_mimes ... FAILED
test common::mime_types::tests::user_input ... ok
test common::mime_types::tests::from_ext ... ok
test common::mime_types::tests::from_path ... ok

failures:

---- apps::user::tests::wildcard_mimes stdout ----
thread 'apps::user::tests::wildcard_mimes' panicked at 'called `Result::unwrap()` on an `Err` value: DirectoryCreationFailed(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })', src/config.rs:28:31
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    apps::user::tests::wildcard_mimes

test result: FAILED. 4 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s

error: test failed, to rerun pass '--bin handlr'

Fixed, after I set an appropriate $HOME environment variable.

from handlr.

chmln avatar chmln commented on June 2, 2024

@mweinelt

So I kinda expect handlr needs that database at runtime as well?

Yes definitely

from handlr.

mweinelt avatar mweinelt commented on June 2, 2024

Thanks, that made everything work.

I wonder, what prevents you from running cargo test as a CI step though?

from handlr.

mweinelt avatar mweinelt commented on June 2, 2024

Thank for the support, I consider this issue resolved.

from handlr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.