Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnichase committed Jun 8, 2024
1 parent 4f03e96 commit e67a65f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
20 changes: 13 additions & 7 deletions packages/got-api-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ tests.

Test suites will fail with a detailed description of the variables that need to be set.

### Environment Variables

Here is a breakdown of the env vars and how you should set them:

`GOT_API_URL`: This is the main endpoint of your API instance. In our case we run tests against
`https://api.dev.gothub.io/`

### Auth

`MAIL_USERNAME`: An IMAP mailbox username that receives mails for your test users. e.g. `[email protected]`. The test
suites create email addresses like `[email protected]` based on this env variable so make sure your mail
server supports the plus-syntax. The main username will still be used to receive test emails.
Expand All @@ -92,13 +92,14 @@ server supports the plus-syntax. The main username will still be used to receive

`MAIL_IMAP_SERVER`: The hostname of the IMAP server

`TEST_USER_1_EMAIL`: An existing test user. You can either create them manually via cognito (in case you don't have an
own implementation of the auth provider) or leverage our IaC components as in [Test Users](#test-users).
`TEST_ADMIN_EMAIL`: Admin user email that exists before the test suites have been executed. The user should have admin
access for the deployed API. Either create it manually or see below to deploy test users via our IaC components
([Test Users](#test-users)).

### Other Test Suites
`TEST_ADMIN_PW`: Password for the admin user.

`TEST_USER_1_EMAIL`: As above. First test user email that exists before the test suites have been executed. Either
create it manually or see below to deploy test users via our IaC components ([Test Users](#test-users)).
`TEST_USER_1_EMAIL`: First test user email that exists before the test suites have been executed. Either create it
manually or see below to deploy test users via our IaC components ([Test Users](#test-users)).

`TEST_USER_1_PW`: Password for the first test user.

Expand All @@ -107,6 +108,11 @@ manually or see below to deploy test users via our IaC components ([Test Users](

`TEST_USER_2_PW`: Password for the second test user.

`INVITE_USER_VALIDATION_VIEW`: `got` view that covers nodes for a user needs read rights in order to invite other users.
Defaults to `'{"root":{"edges":{"from/to":{"include":{"rights":true}}}}}'` The user that wants to invite other users
needs read rights on the root node ID (`root` by default) and read and admin rights on the sub node (along `from/to`
edge by default)

### Deploying Test Support Resources

Tests suites need additional resources in order to run properly. Here are examples for deploying the necessary resources
Expand Down
2 changes: 1 addition & 1 deletion packages/got-api-test/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const INVITE_USER_VALIDATION_VIEW = z
}
})
.pipe(ViewSchema)
.describe('Got view that covers nodes for a user needs read rights in order to invite other users.');
.describe('got view that covers nodes for a user needs read rights in order to invite other users.');

export const MAIL_USERNAME = z
.string()
Expand Down
2 changes: 1 addition & 1 deletion packages/got-api-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gothub/got-api-test",
"version": "0.1.0",
"version": "0.1.1",
"license": "MIT",
"type": "module",
"main": "index.ts",
Expand Down

0 comments on commit e67a65f

Please sign in to comment.