Skip to content

Conversation

mayakarabula
Copy link
Contributor

@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
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
Contributor 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