You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.
We need to write all the test cases for the api/v1/account/ endpoint.
These are the "cloud accounts" associated with the account logged in for regular users, or ALL accounts for all accounts for superusers.
These include:
Happy path -- regular user
See comment by cloudigrade/cloudigrade#237 (comment)
Set up: Create a regular user + get token and configure client to authenticate with regular user's token
Verify that as the user (using their token), I can create an account by sending POST to api/v1/account/ with resourcetype (only valid value is AwsAccount) and account_arn
ARN must be from valid role that permits the cloudigrade server account access)
Verify that as the user, I can request a list of my accounts, and that it only includes my accounts
should create mutliple users and create accounts for all accounts for this test As the user, I can update the name of my accounts (dependent on API to set custom display name for account cloudigrade#267) As the user, I can update the account_arn (?) check with devs. Seems necessary because what if user borks the creation -- and we are not allowing deletion!?
~~ As the user, I can update the resourcetype (? not really critical right now because we only have one resourcetype but will be important if future types come into play.~~
Happy path -- super user
Verify that I can do all the above, except I can also read other users accounts as well as my own.
Negative/edge cases -- regular user
Verify that I cannot create cloud accounts missing resourcetype and/or account_arn Make accounts with a one account and attempt to update them with another by account id
Verify that I cannot delete cloud accounts by sending DELETE to the account URI Attempt to create new account with identical ARN (?) need to research if there is any requirement of uniqueness. Would usage not get double counted because of downstream processing? duplicates not allowed globally
Negative/edge cases -- super user
same except super user can update any account (?)
The text was updated successfully, but these errors were encountered:
@cloudigrade/engineering Can someone look at this issue and provide some feedback on a few points we have questions on? They have (?) next to them in the issue.
kdelee
changed the title
Write and automate test cases for "CRU"ing cloud accounts
Write and automate test cases for creating + reading cloud accounts
Jun 7, 2018
We need to write all the test cases for the
api/v1/account/
endpoint.These are the "cloud accounts" associated with the account logged in for regular users, or ALL accounts for all accounts for superusers.
These include:
Happy path -- regular user
See comment by cloudigrade/cloudigrade#237 (comment)
Set up: Create a regular user + get token and configure client to authenticate with regular user's token
POST
toapi/v1/account/
withresourcetype
(only valid value isAwsAccount
) andaccount_arn
As the user, I can update the name of my accounts (dependent on API to set custom display name for account cloudigrade#267)As the user, I can update theaccount_arn
(?) check with devs. Seems necessary because what if user borks the creation -- and we are not allowing deletion!?~~ As the user, I can update the
resourcetype
(? not really critical right now because we only have oneresourcetype
but will be important if future types come into play.~~Happy path -- super user
Negative/edge cases -- regular user
resourcetype
and/oraccount_arn
Make accounts with a one account and attempt to update them with another by account idDELETE
to the account URIAttempt to create new account with identical ARN (?) need to research if there is any requirement of uniqueness. Would usage not get double counted because of downstream processing?duplicates not allowed globallyNegative/edge cases -- super user
same except super user can update any account (?)The text was updated successfully, but these errors were encountered: