Skip to content

[Improvement][API Test] Add API tests for worker group related APIs#13936

Merged
SbloodyS merged 8 commits intoapache:devfrom
EricGao888:Fix-13859
Apr 26, 2023
Merged

[Improvement][API Test] Add API tests for worker group related APIs#13936
SbloodyS merged 8 commits intoapache:devfrom
EricGao888:Fix-13859

Conversation

@EricGao888
Copy link
Copy Markdown
Member

Purpose of the pull request

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@EricGao888 EricGao888 added improvement make more easy to user or prompt friendly test CI&CD 3.2.0 labels Apr 17, 2023
@EricGao888 EricGao888 added this to the 3.2.0 milestone Apr 17, 2023
@EricGao888 EricGao888 self-assigned this Apr 17, 2023
@github-actions github-actions bot removed the CI&CD label Apr 17, 2023
@EricGao888 EricGao888 changed the title [Improvement][API Test] Add API tests worker group related APIs [Improvement][API Test] Add API tests for worker group related APIs Apr 17, 2023
@EricGao888 EricGao888 marked this pull request as ready for review April 17, 2023 06:42
SbloodyS
SbloodyS previously approved these changes Apr 17, 2023
Copy link
Copy Markdown
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

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

LGTM if CI passed.

@SbloodyS SbloodyS added the CI&CD label Apr 17, 2023
HttpResponse createTenantHttpResponse = tenantPage.createTenant(sessionId, tenant, 1, "");

Assertions.assertFalse(createTenantHttpResponse.body().success());
Assertions.assertFalse(createTenantHttpResponse.getBody().getSuccess());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you think getBody() is neater than body() 😉

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

body() is neater maybe. It seems the configurations of lombok are different in api test and e2e module from those in other modules. I want them to be consistent.

Comment on lines +38 to +43
network:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
gateway: 10.5.0.1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We need to know the worker ip address when calling saveWorkerGroup. If we use a random ip, it would figure out there is no such worker and lead to failure.
image

@EricGao888 EricGao888 requested a review from caishunfeng as a code owner April 26, 2023 03:22
@github-actions github-actions bot added backend and removed CI&CD labels Apr 26, 2023
@github-actions github-actions bot removed the backend label Apr 26, 2023
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 26, 2023

Codecov Report

Merging #13936 (5cdb138) into dev (119f08d) will decrease coverage by 0.67%.
The diff coverage is 11.09%.

❗ Current head 5cdb138 differs from pull request most recent head 506afdd. Consider uploading reports for the commit 506afdd to get more accurate results

@@             Coverage Diff              @@
##                dev   #13936      +/-   ##
============================================
- Coverage     38.86%   38.20%   -0.67%     
+ Complexity     4455     4436      -19     
============================================
  Files          1158     1220      +62     
  Lines         42439    42698     +259     
  Branches       4780     4734      -46     
============================================
- Hits          16494    16311     -183     
- Misses        24123    24584     +461     
+ Partials       1822     1803      -19     
Impacted Files Coverage Δ
...inscheduler/api/controller/ExecutorController.java 17.94% <0.00%> (ø)
...er/api/controller/ProcessDefinitionController.java 58.62% <ø> (ø)
...uler/api/controller/ProcessInstanceController.java 69.56% <ø> (ø)
...nscheduler/api/controller/SchedulerController.java 82.60% <ø> (ø)
...eduler/api/dto/workflow/WorkflowCreateRequest.java 100.00% <ø> (ø)
...eduler/api/dto/workflow/WorkflowUpdateRequest.java 36.36% <ø> (-5.31%) ⬇️
...che/dolphinscheduler/api/python/PythonGateway.java 16.94% <0.00%> (-0.30%) ⬇️
...eduler/api/service/impl/DataSourceServiceImpl.java 49.40% <ø> (ø)
...r/api/service/impl/WorkFlowLineageServiceImpl.java 29.28% <0.00%> (-0.22%) ⬇️
...org/apache/dolphinscheduler/api/vo/ScheduleVo.java 0.00% <0.00%> (ø)
... and 150 more

... and 42 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarqubecloud
Copy link
Copy Markdown

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
No Duplication information No Duplication information

Copy link
Copy Markdown
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

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

+1

@SbloodyS SbloodyS merged commit 4545093 into apache:dev Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement make more easy to user or prompt friendly test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][API Test] Add API test cases for worker group

4 participants