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(e2e): add e2e test for prometheus #942
feat(e2e): add e2e test for prometheus #942
Conversation
Codecov Report
@@ Coverage Diff @@
## master #942 +/- ##
============================================
+ Coverage 32.89% 100.00% +67.10%
============================================
Files 72 1 -71
Lines 7661 1 -7660
============================================
- Hits 2520 1 -2519
+ Misses 4865 0 -4865
+ Partials 276 0 -276 Continue to review full report at Codecov.
|
1. delete e2e.coverprofile; 2. delete prometheus.go; 3. add ApisixRoute into global_rule.go
test/e2e/plugins/server-info.go
Outdated
@@ -32,7 +32,7 @@ var _ = ginkgo.Describe("server-info plugin", func() { | |||
} | |||
s := scaffold.NewScaffold(opts) | |||
|
|||
ginkgo.It("enable server-info plugin", func() { | |||
ginkgo.It("enable server-info plugin_", func() { |
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.
@tao12345666333
I have run into an unexpected problem.
I just have modified the e2e test file for "global_rule".
But it transferred the CI error reporting to the "server-info" plugin's e2e test file.
I have just tried as follows.
- reinstall docker containers after run
sudo docker rm $(docker ps -a -q)
and
sudo rmi $(docker images -a)
and
sudo docker volume prune
. - and
git reset
to the version that we did not change the apisix-alpine(version is reseted to 2.12). There still be problem. - The error message is
expect is True, actual is false
. (Sry, forgive me have delete all data and do not copy the former error message.
I am looking forward to hear from you!
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.
@Chever-John you can just ignore this or disable server-info plugin test case.
In APISIX v2.13 this plugin is disabled by default.
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.
clear!
test/e2e/plugins/server-info.go
Outdated
@@ -32,13 +32,13 @@ var _ = ginkgo.Describe("server-info plugin", func() { | |||
} | |||
s := scaffold.NewScaffold(opts) | |||
|
|||
ginkgo.It("enable server-info plugin", func() { | |||
ginkgo.It("disable server-info plugin", func() { |
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.
There is no need to adjust the content of the test case, just Skip() the test case directly
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.
LGTM.
Let's move forward.
@Chever-John Could you please create another PR to fix the test case of the server-info plugin |
@@ -56,6 +59,30 @@ spec: | |||
// Wait until the ApisixClusterConfig create event was delivered. | |||
time.Sleep(3 * time.Second) | |||
|
|||
ar := fmt.Sprintf(` |
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.
I think it's worthy to write some documents about "How to access Apache APISIX Prometheus Metrics on Kubernetes".
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.
There seems to be a similar article on APISIX's WeChat account
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.
Could we also file them?
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.
Could we also file them?
Yes, but I don't think it has much to do with this PR, I want to merge this PR first. @tokers
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.
OK, let's do it in another PR.
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.
See #953.
add e2e test for prometheus plugin.
#321
apache/apisix#6276
Type of change:
What this PR does / why we need it:
Pre-submission checklist: