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

tests: loosen regex to accommodate variants #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dch
Copy link

@dch dch commented Jan 21, 2022

presumably this is due to differing rust or elixir versions.

erlang 24.1.7
elixir 1.13.1

Running this on FreeBSD 13.0-RELEASE amd64, with rustc 1.57.0, 22 tests & 1 failure:

pre patch

  * ...
  * test open db_path (1.4ms) [L#23]
  * test open invalid db_path (3.5ms) [L#33]

  1) test open invalid db_path (SledTest)
     test/sled_test.exs:33
     Wrong message for ErlangError
     expected:
       ~r/Erlang error: \"sled::Error::Io\(Custom { kind: InvalidInput, error: .*/
     actual:
       "Erlang error: \"sled::Error::Io(Error { kind: InvalidInput, message: \\\"data provided contains a nul byte\\\" })\""
     code: assert_raise ErlangError,
     stacktrace:
       test/sled_test.exs:34: (test)

post patch

  * test open invalid db_path (3.2ms) [L#33]
  * ...
Finished in 0.8 seconds (0.00s async, 0.8s sync)
5 doctests, 22 tests, 0 failures

I'm new to rustler, so it's not clear to me yet where this error originates, but the supplied patch should accommodate both previous and current errors.

presumably this is due to differing rust or elixir versions.
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.

1 participant