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

docs: Add back end E2E test document #1381

Merged
merged 10 commits into from
Jan 29, 2021

Conversation

Jaycean
Copy link
Member

@Jaycean Jaycean commented Jan 27, 2021

Please answer these questions before submitting a pull request


New feature or improvement

  • Add back-end E2E test environment construction and test steps

@Jaycean Jaycean changed the title Add back end E2E test document docs: Add back end E2E test document Jan 27, 2021
@juzhiyuan juzhiyuan requested review from liuxiran and starsz January 27, 2021 07:30
@codecov-io
Copy link

codecov-io commented Jan 27, 2021

Codecov Report

Merging #1381 (36ec862) into master (9cb9aa7) will increase coverage by 0.14%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1381      +/-   ##
==========================================
+ Coverage   65.42%   65.56%   +0.14%     
==========================================
  Files          43       44       +1     
  Lines        2655     2933     +278     
==========================================
+ Hits         1737     1923     +186     
- Misses        713      778      +65     
- Partials      205      232      +27     
Impacted Files Coverage Δ
api/internal/utils/utils.go 67.07% <0.00%> (-4.14%) ⬇️
api/internal/core/storage/etcd.go 44.44% <0.00%> (-4.05%) ⬇️
api/internal/conf/conf.go 67.85% <0.00%> (ø)
api/internal/utils/closer.go 33.33% <0.00%> (ø)
api/internal/filter/schema.go 55.46% <0.00%> (ø)
api/internal/handler/data_loader/route_import.go 64.91% <0.00%> (ø)
api/internal/core/store/validate.go 69.27% <0.00%> (+0.34%) ⬆️
api/internal/handler/data_loader/route_export.go 69.17% <0.00%> (+0.47%) ⬆️
api/internal/route.go 84.84% <0.00%> (+0.47%) ⬆️
api/internal/core/store/store.go 86.66% <0.00%> (+0.59%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cb9aa7...36ec862. Read the comment docs.

docs/back-end-e2e.md Outdated Show resolved Hide resolved
docs/back-end-e2e.md Outdated Show resolved Hide resolved
docs/back-end-e2e.md Outdated Show resolved Hide resolved
docs/back-end-e2e.md Outdated Show resolved Hide resolved
docs/back-end-e2e.md Outdated Show resolved Hide resolved
@Jaycean Jaycean force-pushed the add-back-end-e2e-doc branch from 0d554e7 to 11037b6 Compare January 27, 2021 09:46
@juzhiyuan juzhiyuan requested review from starsz and imjoey January 28, 2021 07:53
Copy link
Contributor

@liuxiran liuxiran left a comment

Choose a reason for hiding this comment

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

LGTM from the style

@Jaycean
Copy link
Member Author

Jaycean commented Jan 28, 2021

At present, the document only provides a separate use of docker to start upstream node. Manage-API, and admin-API to start using source code. I plan to update the document of using docker-compose to start E2E cluster.

@Jaycean
Copy link
Member Author

Jaycean commented Jan 28, 2021

At present, using the source code to start this method needs to modify the E2E test IP, the implementation method is not very friendly, do you have better suggestions?
cc @nic-chen @starsz @imjoey


6. After all the services are started, you can start the back-end E2E test.

7. The upstream node IP is temporarily changed to the local IP address. After the test, it should be changed to GitHub upstream node IP. If the test case does not involve the upstream node, it does not need to be modified.
Copy link
Member

Choose a reason for hiding this comment

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

@Jaycean Since within this step, developers are required to change every single occurrence for IP address of upstream nodes. Cause I believe that we need to cover all test cases even for only few changes. So I'm afraid this is not a rather practical way. How about just guide developers to setup docker-compose environment for local e2e testing? Thanks.

Copy link
Member

Choose a reason for hiding this comment

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

I use docker-compose to run local e2e testing. when I update the main code, just delete the image of Manager API and let it rebuild. building the image of Manager API only takes a little time.

Copy link
Member

Choose a reason for hiding this comment

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

I use docker-compose to run local e2e testing. when I update the main code, just delete the image of Manager API and let it rebuild. building the image of Manager API only takes a little time.

@nic-chen yep, from my perspective, yours is much better and even easier. Thanks for sharing.

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the steps of using docker compose for E2E testing. It's really unfriendly to start the method locally according to the source code, so is this method left for developers to choose, or is it just run with docker compose?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good. Using docker-compose for E2E is a better way.

Copy link
Member

Choose a reason for hiding this comment

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

@Jaycean current doc is awesome. Thanks for the update.

docs/back-end-e2e.md Outdated Show resolved Hide resolved
@starsz
Copy link
Contributor

starsz commented Jan 29, 2021

@juzhiyuan @LiteSun Please take a look at the FE test.

@LiteSun
Copy link
Member

LiteSun commented Jan 29, 2021

@juzhiyuan @LiteSun Please take a look at the FE test.

ok.

ping @guoqqqi https://github.com/apache/apisix-dashboard/pull/1381/checks?check_run_id=1788500888

Copy link
Member

@imjoey imjoey left a comment

Choose a reason for hiding this comment

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

/lgtm
Thanks @Jaycean . We can merge this once CI passes.

@juzhiyuan juzhiyuan merged commit 619165a into apache:master Jan 29, 2021
@Jaycean Jaycean deleted the add-back-end-e2e-doc branch February 3, 2021 07:08
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.

Doc: Add the document of backend E2E environment
8 participants