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

feat: rewrite e2e test(service_test) with ginkgo #1545

Merged

Conversation

Jaycean
Copy link
Member

@Jaycean Jaycean commented Mar 2, 2021

Please answer these questions before submitting a pull request


New feature or improvement

  • Rewrite e2e test(service_test) with ginkgo

@codecov-io
Copy link

codecov-io commented Mar 2, 2021

Codecov Report

Merging #1545 (69cef16) into master (76e0e05) will increase coverage by 2.76%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1545      +/-   ##
==========================================
+ Coverage   68.96%   71.73%   +2.76%     
==========================================
  Files          48       81      +33     
  Lines        3055     2176     -879     
  Branches        0      549     +549     
==========================================
- Hits         2107     1561     -546     
+ Misses        708      615      -93     
+ Partials      240        0     -240     
Flag Coverage Δ
frontend-e2e-test 71.73% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../internal/handler/authentication/authentication.go
api/internal/core/storage/storage_mock.go
api/internal/handler/route/route.go
api/internal/filter/cors.go
api/internal/handler/tool/tool.go
api/internal/filter/authentication.go
api/internal/core/store/store_mock.go
api/internal/handler/handler.go
api/internal/core/store/store.go
api/internal/utils/json_patch.go
... and 119 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 76e0e05...69cef16. Read the comment docs.

Method: http.MethodDelete,
Path: "/apisix/admin/services/s1",
Headers: map[string]string{"Authorization": base.GetToken()},
ExpectStatus: http.StatusOK,
Copy link
Member

Choose a reason for hiding this comment

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

Need to sleep here, because it may check whether there is a bound route.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

Path: "/apisix/admin/services/s1",
Headers: map[string]string{"Authorization": base.GetToken()},
ExpectCode: http.StatusOK,
ExpectBody: "\"name\":\"testservice\",\"upstream\":{\"nodes\":[{\"host\":\"" + base.UpstreamIp + "\",\"port\":1980,\"weight\":1},{\"host\":\"" + base.UpstreamIp + "\",\"port\":1981,\"weight\":2},{\"host\":\"" + base.UpstreamIp + "\",\"port\":1982,\"weight\":3}],\"type\":\"roundrobin\"}",
Copy link
Member

Choose a reason for hiding this comment

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

need to sleep for data sync

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

Path: "/apisix/admin/services/s1",
Headers: map[string]string{"Authorization": base.GetToken()},
ExpectCode: http.StatusOK,
ExpectBody: "\"upstream\":{\"nodes\":[{\"host\":\"" + base.UpstreamIp + "\",\"port\":1980,\"weight\":1}],\"type\":\"roundrobin\"},\"plugins\":{\"limit-count\":{\"count\":100,\"key\":\"remote_addr\",\"rejected_code\":503,\"time_window\":60}}",
Copy link
Member

Choose a reason for hiding this comment

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

need to sleep for data sync

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

Method: http.MethodDelete,
Path: "/apisix/admin/services/s1",
Headers: map[string]string{"Authorization": base.GetToken()},
ExpectStatus: http.StatusOK,
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@nic-chen nic-chen merged commit 845cf99 into apache:master Mar 3, 2021
@nic-chen
Copy link
Member

nic-chen commented Mar 3, 2021

merged. @Jaycean thanks very much.

@Jaycean Jaycean deleted the rewrite-e2e-test-service-test-with-ginkgo branch March 10, 2021 01:03
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.

4 participants