scala-academy / castalia

API stub server
Other
8 stars 3 forks source link

As a stubserver consumer I want to be able to access an endpoint and get responses #2

Closed TimSoethout closed 8 years ago

TimSoethout commented 9 years ago

Acceptance criteria:

given that the stubserver is running and a stub with endpoint "hardcodeddummystub" is defined when I do a HTTP GET to .../castalia/stubs/hardcodeddummystub then I should get a HTTP 200 response from the stubserver

given that the stubserver is running and no stub with endpoint "nonexistingstub" is defined when I do a HTTP GET to .../castalia/stubs/nonexistingstub then I should get a HTTP 404 response from the stubserver

TimSoethout commented 8 years ago

One possibility is to use Finagle to make calls to http-servers: https://twitter.github.io/finagle/guide/Quickstart.html#using-clients

rezolya commented 8 years ago

I am not sure how to interpret this US... do we define the hardcodeddummy stub in the spray routes? or do we need to implement a way to configure the stubs in the stub server via an api call or some other way?

jordi133 commented 8 years ago

Hi Rezolya, in this user story a definition of the hardcoded stub in the spray routes is good enough. Configurable endpoints will be part of a later story. Does that answer your question?

rezolya commented 8 years ago

Yes :)