dongjiang1989 commented on code in PR #10917:
URL: https://github.com/apache/apisix/pull/10917#discussion_r1494037787
##########
t/kubernetes/discovery/kubernetes2.t:
##########
@@ -99,6 +99,21 @@ _EOC_
$block->set_value("main_config", $main_config);
my $config = $block->config // <<_EOC_;
+ location /informer {
Review Comment:
Just fix Informer_factory.path splicing problem
##########
t/kubernetes/discovery/kubernetes2.t:
##########
@@ -749,3 +764,26 @@ $::scale_ns_c",
"DONE\n",
"{ 0 0 1 0 0 1 }\n",
]
+
+
+
+=== TEST 12: parse informer_factory information
+--- yaml_config eval: $::yaml_config
+--- request eval
+[
+
+"GET /queries
+[
+ \"first/ns-a/ep:p1\",\"first/ns-a/ep:p2\",
+ \"second/ns-a/ep:p1\",\"second/ns-a/ep:p2\"
+]",
+
+"GET /informer
+[]"
+
+]
+--- response_body eval
+[
+ "{ 0 0 0 0 }\n",
+ "{ 0 }\n",
+]
Review Comment:
Will remove it.
##########
t/kubernetes/discovery/kubernetes2.t:
##########
@@ -99,6 +99,21 @@ _EOC_
$block->set_value("main_config", $main_config);
my $config = $block->config // <<_EOC_;
+ location /informer {
+ content_by_lua_block {
+ local informer_factory =
require("apisix.discovery.kubernetes.informer_factory")
+ ngx.sleep(1)
+ local response_body = "{"
+ local informer, err = informer_factory.new("", "v1",
"Endpoints", "endpoints", "default")
Review Comment:
This case just testing Informer_factory.path. e2e case watch apiserver is
difficult
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]