Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Stop deployment log polling after cancellation, Update configuration in rollback command and Update snyk vulnerabilities#222
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
09f6b0ce7c11fa6a1f57cc6606bd20dd8736d9d6392a8273714e4aa3a555987a2df5fdFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -105,6 +105,30 @@ describe('FileUpload Adapter', () => { | ||
| expect(showSuggestionMock).not.toHaveBeenCalled(); | ||
| }); | ||
| it('should exit with code 1 when deployment status is CANCELLED for new project', async () => { | ||
| const fileUploadInstance = new FileUpload({ | ||
| config: { | ||
| isExistingProject: false, | ||
| currentDeploymentStatus: DeploymentStatus.CANCELLED, | ||
| }, | ||
| log: logMock, | ||
| exit: exitMock, | ||
| } as any); | ||
| try { | ||
| await fileUploadInstance.run(); | ||
| } catch (error: any) { | ||
| expect(error.message).toBe('1'); | ||
| } | ||
| expect(handleNewProjectMock).toHaveBeenCalled(); | ||
| expect(prepareLaunchConfigMock).toHaveBeenCalled(); | ||
| expect(showLogsMock).toHaveBeenCalled(); | ||
| expect(exitMock).toHaveBeenCalledWith(1); | ||
| expect(showDeploymentUrlMock).not.toHaveBeenCalled(); | ||
| expect(showSuggestionMock).not.toHaveBeenCalled(); | ||
| }); | ||
chhavi-mandowara-cstk marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| it('should continue normally when deployment status is not FAILED', async () => { | ||
| const fileUploadInstance = new FileUpload({ | ||
| config: { | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -723,6 +723,30 @@ describe('GitHub Adapter', () => { | ||
| expect(showSuggestionMock).not.toHaveBeenCalled(); | ||
| }); | ||
| it('should exit with code 1 when deployment status is CANCELLED for new project', async () => { | ||
| const githubInstance = new GitHub({ | ||
| config: { | ||
| isExistingProject: false, | ||
| currentDeploymentStatus: DeploymentStatus.CANCELLED, | ||
| }, | ||
| log: logMock, | ||
| exit: exitMock, | ||
| } as any); | ||
| try { | ||
| await githubInstance.run(); | ||
| } catch (error: any) { | ||
| expect(error.message).toBe('1'); | ||
| } | ||
| expect(handleNewProjectMock).toHaveBeenCalled(); | ||
| expect(prepareLaunchConfigMock).toHaveBeenCalled(); | ||
| expect(showLogsMock).toHaveBeenCalled(); | ||
| expect(exitMock).toHaveBeenCalledWith(1); | ||
| expect(showDeploymentUrlMock).not.toHaveBeenCalled(); | ||
| expect(showSuggestionMock).not.toHaveBeenCalled(); | ||
| }); | ||
chhavi-mandowara-cstk marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| it('should continue normally when deployment status is not FAILED', async () => { | ||
| const githubInstance = new GitHub({ | ||
| config: { | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -54,6 +54,8 @@ export default class Rollback extends BaseCommand<typeof Rollback> { | ||
| if (!this.flags.environment) { | ||
| await this.getConfig(); | ||
| } | ||
| await this.prepareApiClients(); | ||
chhavi-mandowara-cstk marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| if (!this.sharedConfig.currentConfig?.uid) { | ||
| await selectOrg({ | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.