GithubHelp home page GithubHelp logo

elitau / pact_elixir Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 8.0 1.32 MB

Elixir version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.

License: MIT License

Elixir 96.32% Rust 3.68%

pact_elixir's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar elitau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pact_elixir's Issues

CI is halted after too many runs per month

Travis seems to have a very limited amount of credits for OSS:

Builds have been temporarily disabled for public repositories due to a negative credit balance.

Another CI provider might be useful.

Use Semantic Release

With semantic-release semantic versioning is assured, a changelog is generated and a lot of other great features and open source library guidelines are realised.

Support for Erlang/OTP 22?

Hey,

First of all thank you for the library ๐Ÿ™Œ I'm using it for the first time in a project that's running Erlang/OTP 22, and I'm getting the following error:

==> pact_elixir
Compiling NIF crate :pactmockserver (native/pactmockserver)...
   Compiling erlang_nif-sys v0.6.4
   Compiling url v1.5.1
   Compiling unicase v1.4.2
   Compiling rustler_codegen v0.18.0
   Compiling env_logger v0.4.3
error: failed to run custom build command for `erlang_nif-sys v0.6.4`

Caused by:
  process didn't exit successfully: `/home/app/elixir-artifacts/_build/service_level_test/rustler_crates/pac
tmockserver/release/build/erlang_nif-sys-530dba2e3c1f88c9/build-script-build` (exit code: 101)
--- stdout
Unsupported Erlang version.

Is the erlang_nif-sys version up to date in the Cargo.toml?
Does 'cargo update' fix it?
If not please report at https://github.com/goertzenator/erlang_nif-sys.

--- stderr
thread 'main' panicked at 'gen_api.erl encountered an error.', /home/app/.cargo/registry/src/github.com-1ecc
6299db9ec823/erlang_nif-sys-0.6.4/build.rs:28:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Is it possible to add support for Erlang/OTP 22? Is it just a matter of updating the rustler version in the Cargo.toml? If so, I don't mind submitting a PR! Thanks in advance ๐Ÿ™‡โ€โ™‚๏ธ

Supervise mock servers

During boot of the pact_elixir application a Supervisor with :simple_one_for_one strategy (or the new Dynamic Supervisor should be started. Then start mock servers upon test run with Supervisor.start_child(supervisor_pid, [args]) and stop them with Supervisor.terminate_child(supervisor_pid, child_pid).

Thus the mock servers would be restarted upon errors during test runs without bringing the whole application down.

Why not Pact specification v3?

It seems that this pact elixir implements against PACT V2.
Current version it is V3.

Do you have a plan to move to V3?

thanks

Think of a usable Rust API for pact_verifier

@uglyog from pact-reference told me this about the pact_ verifier lib:

ME: I have a very rough implementation of the consumer side (through wrapping pact_mock_server) and now had looked into the provider side. But the API there is kind of hard: you need to pass in many complex objects into theverify_provider function (ProviderInfo, PactSource etc.). Is it planned to create a simpler API there, too?

@uglyog: There has been a bit of discussion on what the provide API should look like. No consensus yet, I was waiting for an implementation so we can work it out. If you can define what you need (making it consumer driven ๐Ÿ˜‰ ), we could implement that.

Crash when starting mock server on port 22

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Error { repr: Os { code: 13, message: "Permission denied" } })', src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:906:4


  1) test fails if mock server could start because of other error (PactElixir.RustPactMockServerFacadeTest)
     test/mock_server/rust_pact_mock_server_facade_test.exs:52
     ** (ErlangError) Erlang error: :nif_panic

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.