dailai commented on code in PR #6635:
URL: https://github.com/apache/seatunnel/pull/6635#discussion_r1556651849


##########
seatunnel-e2e/seatunnel-core-e2e/seatunnel-starter-e2e/src/test/java/org/apache/seatunnel/core/starter/seatunnel/SeaTunnelConnectorTest.java:
##########
@@ -0,0 +1,116 @@
+/*
+ * 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.seatunnel.core.starter.seatunnel;
+
+import org.apache.seatunnel.common.constants.PluginType;
+import org.apache.seatunnel.e2e.common.TestResource;
+import org.apache.seatunnel.e2e.common.TestSuiteBase;
+import org.apache.seatunnel.e2e.common.container.EngineType;
+import org.apache.seatunnel.e2e.common.container.TestContainer;
+import org.apache.seatunnel.e2e.common.junit.DisabledOnContainer;
+import org.apache.seatunnel.e2e.common.util.ContainerUtil;
+
+import org.apache.commons.lang3.StringUtils;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.TestTemplate;
+import org.testcontainers.containers.Container;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.stream.Collectors;
+
+@DisabledOnContainer(
+        value = {},
+        type = {EngineType.SPARK, EngineType.FLINK},
+        disabledReason = "Only support for seatunnel")
+@Slf4j
+public class SeaTunnelConnectorTest extends TestSuiteBase implements 
TestResource {
+
+    /**
+     * Connectors that do not implement the Factory interface should be 
excluded because they cannot
+     * be discovered by seatunnel-plugin-discovery todo: If these connectors 
implement the Factory
+     * interface in the future, it should be removed from here
+     */
+    private static final Set<String> EXCLUDE_CONNECTOR =
+            new HashSet() {
+                {
+                    add("TDengine");
+                    add("SelectDBCloud");
+                }
+            };
+
+    @Override
+    public void startUp() throws Exception {}
+
+    @Override
+    public void tearDown() throws Exception {}
+
+    @TestTemplate
+    public void testExecCheck(TestContainer container) throws Exception {
+        String[] case1 = {"-l -pt source"};
+        execCheck(container, case1, PluginType.SOURCE);
+
+        String[] case2 = {"-l -pt sink"};
+        execCheck(container, case2, PluginType.SINK);
+
+        String[] case3 = {"-o Paimon -pt sink"};
+        Container.ExecResult execResult = 
container.executeConnectorCheck(case3);
+        Assertions.assertEquals(0, execResult.getExitCode());
+        Assertions.assertTrue(StringUtils.isBlank(execResult.getStderr()));
+        log.info(execResult.getStdout());

Review Comment:
   OK



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