Skip to content

Mock ferry for integration tests #23

Description

@retzkek

We don't even have to write anything, tools already exist, for example https://github.com/stoplightio/prism

> npx @stoplight/prism-cli mock swagger.json &
[12:37:27 PM] › [CLI] …  awaiting  Starting Prism…
[12:37:27 PM] › [CLI] ℹ  info      GET        http://127.0.0.1:4010/IsUserLeaderOfGroup
[12:37:27 PM] › [CLI] ℹ  info      GET        http://127.0.0.1:4010/IsUserMemberOfGroup
...
[12:37:27 PM] › [CLI] ▶  start     Prism is listening on http://127.0.0.1:4010
> curl 'localhost:4010/getUserInfo?username=nobody' 
[12:38:33 PM] › [HTTP SERVER] get /getUserInfo ℹ  info      Request received
[12:38:33 PM] ›     [NEGOTIATOR] ℹ  info      Request contains an accept header: */*
[12:38:33 PM] ›     [VALIDATOR] ✔  success   The request passed the validation rules. Looking for the best response
[12:38:33 PM] ›     [NEGOTIATOR] ✔  success   Found a compatible content for */*
[12:38:33 PM] ›     [NEGOTIATOR] ✔  success   Responding with the requested status code 200
[12:38:33 PM] ›     [NEGOTIATOR] ℹ  info      > Responding with "200"
{"banned":true,"expirationdate":"string","fullname":"string","groupaccount":"string","status":true,"uid":0,"vopersonid":"string"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions