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

#1724 - E2E/Units Tests - Review Queue Consumers E2E Tests #1872

Merged
merged 27 commits into from
Apr 13, 2023

Conversation

andrewsignori-aot
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot commented Apr 11, 2023

  • Created the queue-consumers helper method createTestingAppModule to start the queue-consumers module for all E2E tests.
  • Created the helper method describeProcessorRootTest with the intention to create a similar one for the scheduler in the future.
  • Extended the mocked Zeebe module.
  • Added the mock helper @golevelup/ts-jest referenced on Nestjs documentation (https://docs.nestjs.com/fundamentals/testing). The idea is to validate how useful it can be and assess if it is needed or not.
  • New scenarios added for start-application-assessment and cancel-application-assessment, as shown below.
  • ecert-full-time-process-integration.scheduler.e2e-spec is not the focus of this PR. It was just adjusted to fit better in the new E2E structure.

Processor E2E tests for start-application-assessment
√ Should throw an error when the workflow createProcessInstance method throws an error.
√ Should invoke the workflow create instance method with the received job parameters.

Processor E2E tests for cancel-application-assessment
√ Should cancel pending disbursements and rollback overawards when the cancelled application has overawards and also one sent and one pending disbursements.
√ Should cancel workflow and log a warning when the workflowInstanceId is not present.
√ Should throw an error and call job.discard when the application is not in the expected status.
√ Should throw an error and call job.discard when the assessment id was not found.

@andrewsignori-aot andrewsignori-aot changed the title #1724 - Queue Consumers E2E Tests #1724 - E2E/Units Tests - Review Queue Consumers E2E Tests Apr 11, 2023
@andrewsignori-aot andrewsignori-aot self-assigned this Apr 11, 2023
Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

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

Good work @andrewsignori-aot 👍 Only minor comments. Approving the PR

@dheepak-aot
Copy link
Collaborator

Thanks for creating E2E test foundation for queue consumers. Added some comments.

Copy link
Collaborator

@andrepestana-aot andrepestana-aot left a comment

Choose a reason for hiding this comment

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

Great job. I just added a question.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 17.95% ( 1960 / 10921 )
Methods: 8.1% ( 115 / 1420 )
Lines: 20.64% ( 1716 / 8312 )
Branches: 10.85% ( 129 / 1189 )

@github-actions
Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 32.41% ( 176 / 543 )
Methods: 21.25% ( 17 / 80 )
Lines: 39.25% ( 157 / 400 )
Branches: 3.17% ( 2 / 63 )

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 65.01% ( 353 / 543 )
Methods: 53.62% ( 37 / 69 )
Lines: 67.24% ( 312 / 464 )
Branches: 40% ( 4 / 10 )

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 38.41% ( 2602 / 6775 )
Methods: 30.24% ( 267 / 883 )
Lines: 43.95% ( 2221 / 5053 )
Branches: 13.59% ( 114 / 839 )

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes and walking through the replace module code. LGTM 👍

Copy link
Collaborator

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

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

LGTM, nice work @andrewsignori-aot

@andrewsignori-aot andrewsignori-aot merged commit 1bb76f8 into main Apr 13, 2023
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV April 13, 2023 22:38 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV April 13, 2023 22:40 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot temporarily deployed to DEV April 13, 2023 22:50 — with GitHub Actions Inactive
@andrewsignori-aot andrewsignori-aot deleted the feature/#1724-queue-conumers-e2e-tests branch April 18, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants