-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Test] Update 'Factory' E2E test #23311
base: main
Are you sure you want to change the base?
Conversation
registerRunningWorkspace(''); | ||
}); | ||
} else { | ||
suiteTeardown('Registering the running workspace', function (): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, this step is redundant and could be committed.
@@ -130,6 +132,16 @@ export const BASE_TEST_CONSTANTS: { | |||
*/ | |||
DELETE_WORKSPACE_ON_FAILED_TEST: process.env.DELETE_WORKSPACE_ON_FAILED_TEST === 'true', | |||
|
|||
/** | |||
* stop and remove workspace if a test is successful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add the comment that , true by default
to make it clear
DELETE_WORKSPACE_ON_SUCCESSFUL_TEST: process.env.DELETE_WORKSPACE_ON_SUCCESSFUL_TEST !== 'false', | ||
|
||
/** | ||
* restart existing workspace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More relevant comment could be Select opening an existing workspace instead of creating a new one if a duplicate workspace is created from the factory or sample list. This option is false by default.
/** | ||
* restart existing workspace. | ||
*/ | ||
IS_RESTART_EXISTING_WORKSPACE: process.env.IS_RESTART_EXISTING_WORKSPACE === 'true', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, the more relevant constant name is SELECT_OPENING_EXISTING_WORKSPACE_INSTEAD_OF_CREATION_NEW
@@ -88,6 +88,13 @@ suite( | |||
}); | |||
} | |||
|
|||
if (BASE_TEST_CONSTANTS.IS_RESTART_EXISTING_WORKSPACE) { | |||
test('Restart existing workspace', async function (): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Restart existing workspace' -> Select opening an existing workspace instead of creating a new one.
@dmytro-ndp, I think that all comments need to be accepted. |
What does this PR do?
Factory
E2E test to do checking test-cases of factory with gitlab server private repo when OAuth token is expired.DELETE_WORKSPACE_ON_SUCCESSFUL_TEST
totests/e2e/constants/BASE_TEST_CONSTANTS.ts
IS_RESTART_EXISTING_WORKSPACE
totests/e2e/constants/BASE_TEST_CONSTANTS.ts
Screenshot/screencast of this PR
Factory
E2E test on local Jenkins with PR changes:restart-ws-logs.txt
factory-oauth-no-delete-ws-logs.txt
What issues does this PR fix or reference?
How to test this PR?
Run the
Factory.spec.ts
as usualPR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.