Page MenuHomePhabricator

BDD tests: environments
Closed, ResolvedPublic3 Estimated Story Points

Description

This task's scope includes adding BDD tests for the workflows of the API's /environment endpoint.

That includes:

  • Only authenticated users can access the endpoints (either user token or admin token)
  • GET /environment returns all environments created by the authenticated token or all envs if the authenticated token is the admin
  • POST /environment/ creates a new environment associated to the authenticated token
  • GET /environment/:id returns the details for env id if the environment belongs to the authenticated token or the authenticated token is the admin. Access refused otherwise
  • DELETE /environment/:id deletes env id if the environment belongs to the authenticated token or the authenticated token is the admin. Access refused otherwise
  • GET /environment/:id/logs returns the logs from all pods associated to env id if the environment belongs to the authenticated token or the authenticated token is the admin. Access refused otherwise

Besides the above scenarios, tests should also cover negative cases, e.g. env doesn't exist, env was deleted, env already exists, etc

Event Timeline

thcipriani set the point value for this task to 3.
thcipriani edited projects, added Catalyst (whole 'nother); removed Catalyst.
thcipriani moved this task from Backlog to Ready on the Catalyst (whole 'nother) board.
thcipriani subscribed.
thcipriani edited projects, added Catalyst (AGL); removed Catalyst.
thcipriani moved this task from Backlog to Waiting for review on the Catalyst (AGL) board.
thcipriani added a project: Patch-For-Review.