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

New Feature: Default Response #2

Open
omgitsbillryan opened this issue Oct 23, 2017 · 1 comment
Open

New Feature: Default Response #2

omgitsbillryan opened this issue Oct 23, 2017 · 1 comment

Comments

@omgitsbillryan
Copy link
Contributor

omgitsbillryan commented Oct 23, 2017

Context

As of now, if mock data doesn't exist for call, the application will run through the normal Faraday request which likely involves a remote call to an external service. In some situations/environments (like vets-api), this will cause an error because the external service is not properly set up, such as in a local dev environment. This also causes confusion, because the user of betamocks might think that betamocks isn't working at all.

New Feature : Default Response

Have a setting that puts betamocks into one of two modes:

  • "Recording"
  • "Playback"

"Recording" Mode

Mock responses will be used if found. Otherwise betamocks will act as a middleware pass-through and attempt to record the response.

"Playback" Mode

If betamocks can't find an appropriate response, it will default to some pre-defined response. E.g.

image

@emersonthis
Copy link

@omgitsbillryan Is this still open? I've heard this feature described as if it's already implemented.

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

No branches or pull requests

2 participants