Giter Site home page Giter Site logo

Comments (4)

rholshausen avatar rholshausen commented on June 20, 2024

Can you confirm the version you are using? I can't replicate this, it works correctly for me.

With a Pact file with those 3 interactions, I get:

❯ curl 'http://127.0.0.1:40957/endpoint'
{"response":1}
❯ curl 'http://127.0.0.1:40957/endpoint?type=foo'
{"response":2}
❯ curl 'http://127.0.0.1:40957/endpoint?type=bar'
{"response":3}
❯ curl -v 'http://127.0.0.1:40957/endpoint?type=x'
*   Trying 127.0.0.1:40957...
* Connected to 127.0.0.1 (127.0.0.1) port 40957 (#0)
> GET /endpoint?type=x HTTP/1.1
> Host: 127.0.0.1:40957
> User-Agent: curl/7.81.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< access-control-allow-origin: *
< content-length: 0
< date: Mon, 24 Oct 2022 05:17:05 GMT
< 
* Connection #0 to host 127.0.0.1 left intact

from pact-mock_service.

jstockwin avatar jstockwin commented on June 20, 2024

Hi @rholshausen, thanks for the response.

I've just created https://github.com/jstockwin/pact-issue-demo to demonstrate this issue.

If I curl http://localhost:8000/endpoint?type=bar there, I'm getting the (incorrect) response of {"type":"none"}.

The docker-logs.txt file shows the messages about multiple interactions matching.

I probably should have mentioned that I'm doing this through the pactfoundation/pact-cli:latest docker image. Am I in the wrong place?

Overriding the command there to run the version command of the CLI gives me 0.5.0. I don't seem to be able to do this for the stub-service command on it's own.

from pact-mock_service.

rholshausen avatar rholshausen commented on June 20, 2024

Ah! Yeah, that would need to be addressed with the pact-cli project. It is a different implementation.

from pact-mock_service.

rholshausen avatar rholshausen commented on June 20, 2024

I'll move this issue to that project

from pact-mock_service.

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.