dockerzhang commented on code in PR #5261:
URL: https://github.com/apache/inlong/pull/5261#discussion_r936210808
##########
inlong-agent/agent-plugins/src/test/resources/test/2.txt:
##########
@@ -1,2 +1,2 @@
hello
-world
\ No newline at end of file
+world bb
Review Comment:
ditto
##########
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/constant/CommonConstants.java:
##########
@@ -160,4 +160,19 @@ public class CommonConstants {
public static final String KEY_METRICS_INDEX = "metricsIndex";
+ public static final String HTTPS = "https://";
+ public static final String KUBERNETES_SERVICE_HOST =
"KUBERNETES_SERVICE_HOST";
+ public static final String KUBERNETES_SERVICE_PORT =
"KUBERNETES_SERVICE_PORT";
+
+ //k8s information
+ public static final String NAMESPACE = "namespace";
+ public static final String POD_NAME = "pod.name";
+ public static final String CONTAINER_NAME = "container.name";
+ public static final String CONTAINER_ID = "container.id";
+
+ public static final String COMMA = ",";
+ public static final String DELIMITER_1 = "-";
Review Comment:
avoid using `1` and `2` to name the parameters, making the parameters more
meaningful.
##########
inlong-agent/agent-plugins/src/test/resources/test/a.txt:
##########
@@ -1,2 +1,3 @@
-test a
-test b
\ No newline at end of file
+test bb a
Review Comment:
ditto
##########
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/constant/CommonConstants.java:
##########
@@ -160,4 +160,19 @@ public class CommonConstants {
public static final String KEY_METRICS_INDEX = "metricsIndex";
+ public static final String HTTPS = "https://";
+ public static final String KUBERNETES_SERVICE_HOST =
"KUBERNETES_SERVICE_HOST";
+ public static final String KUBERNETES_SERVICE_PORT =
"KUBERNETES_SERVICE_PORT";
+
+ //k8s information
+ public static final String NAMESPACE = "namespace";
+ public static final String POD_NAME = "pod.name";
+ public static final String CONTAINER_NAME = "container.name";
+ public static final String CONTAINER_ID = "container.id";
Review Comment:
please move all k8s constants to individual files.
##########
inlong-agent/agent-plugins/src/test/resources/test/1.txt:
##########
@@ -1,2 +1,3 @@
-hello
-world
\ No newline at end of file
+hello bb aa
Review Comment:
To make the UT text more meaningful, it's better to add complete content.
##########
inlong-agent/agent-plugins/src/test/java/org/apache/inlong/agent/plugin/AgentTest.java:
##########
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.inlong.agent.plugin;
+
+import org.apache.inlong.agent.core.AgentMain;
+
+/**
+ * The process test
+ */
+public class AgentTest {
Review Comment:
what's the UT test?
--
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]