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

chore: integration test keys #495

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

mayakarabula
Copy link
Member

@mayakarabula mayakarabula commented Nov 2, 2023

integration test take a lot of time because we are generating new keys every time, we can just add and remove environments from one predefined key

@mayakarabula mayakarabula requested a review from a team as a code owner November 2, 2023 14:45
@@ -3,6 +3,9 @@ import { createClient } from 'contentful'
import { ApiKey, Environment } from 'contentful-management'
import { CreateApiKeyProps, Space } from 'contentful-management/types'

export const INTEGRATION_TEST_KEY = '5HAbGYZ6iZWiDXGxMtvsrW'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name them something along the line of "access key id"?

try {
cdaTokenWithOnlyMasterAccess = await testSpace.getApiKey(INTEGRATION_TEST_KEY_MASTER)
} catch (e) {
cdaTokenWithOnlyMasterAccess = await createCdaToken(testSpace, ['master'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what case would we end up in the catch clause?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the key is not found, for example, if it was removed

@marcolink
Copy link
Member

Love it - thank you! 🎉

@marcolink
Copy link
Member

@mayakarabula Should we merge it? :)

@mayakarabula mayakarabula requested a review from a team as a code owner July 3, 2024 14:21
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

Successfully merging this pull request may close these issues.

2 participants