-
Notifications
You must be signed in to change notification settings - Fork 527
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
feat: rewrite e2e test(service_test) with ginkgo #1545
Conversation
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Method: http.MethodDelete, | ||
Path: "/apisix/admin/services/s1", | ||
Headers: map[string]string{"Authorization": base.GetToken()}, | ||
ExpectStatus: http.StatusOK, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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\"}", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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}}", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
merged. @Jaycean thanks very much. |
Please answer these questions before submitting a pull request
Why submit this pull request?
Bugfix
New feature provided
Improve performance
Backport patches
Related issues
Feat: Rewrite all E2E tests using the Ginkgo #1500
New feature or improvement