spacewander commented on code in PR #7782:
URL: https://github.com/apache/apisix/pull/7782#discussion_r956718372


##########
t/plugin/kafka-logger.t:
##########
@@ -592,3 +592,40 @@ qr/partition_id: 2/]
 [qr/partition_id: 1/,
 qr/partition_id: 0/,
 qr/partition_id: 2/]
+
+
+
+=== TEST 20: sasl simple send
+--- http_config eval: $::HttpConfig
+--- config
+    location /t {
+        content_by_lua_block {
+            local producer = require "resty.kafka.producer"
+            local broker_list = {
+                {
+                    host = "127.0.0.1",
+                    port = 9092,
+                    sasl_config = {
+                        mechanism = "PLAIN",
+                        strategy = "sasl",
+                        user = "admin",
+                        password = "admin-secret"
+                    }
+                }
+            }
+            local message = "halo world"
+            local p = producer:new(broker_list)

Review Comment:
   The test doesn't pass through the code you add.
   
   We can inject a hook or mock into the code. Like:
   
https://github.com/apache/apisix/blob/b3d4b464045b9bdfed3170cbd7a343ed5c40b24a/t/plugin/zipkin2.t#L35
   
https://github.com/apache/apisix/blob/b3d4b464045b9bdfed3170cbd7a343ed5c40b24a/t/plugin/opentelemetry.t#L553



-- 
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]

Reply via email to