This is an automated email from the ASF dual-hosted git repository. zykkk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 94373330ff7 [test](doc) add jdbc catalog docs example test case (#43641) 94373330ff7 is described below commit 94373330ff7e9beda207da60ec83351c9ac15911 Author: zy-kkk <zhongyongk...@selectdb.com> AuthorDate: Thu Nov 14 10:11:02 2024 +0800 [test](doc) add jdbc catalog docs example test case (#43641) --- .../suites/doc/external/jdbc/clickhouse.md.groovy | 41 ++++++++++++++++++++ .../suites/doc/external/jdbc/ibmdb2.md.groovy | 41 ++++++++++++++++++++ .../suites/doc/external/jdbc/mysql.md.groovy | 41 ++++++++++++++++++++ .../suites/doc/external/jdbc/oceanbase.md.groovy | 41 ++++++++++++++++++++ .../suites/doc/external/jdbc/oracle.md.groovy | 42 +++++++++++++++++++++ .../suites/doc/external/jdbc/postgresql.md.groovy | 41 ++++++++++++++++++++ .../suites/doc/external/jdbc/saphana.md.groovy | 44 ++++++++++++++++++++++ .../suites/doc/external/jdbc/sqlserver.md.groovy | 41 ++++++++++++++++++++ 8 files changed, 332 insertions(+) diff --git a/regression-test/suites/doc/external/jdbc/clickhouse.md.groovy b/regression-test/suites/doc/external/jdbc/clickhouse.md.groovy new file mode 100644 index 00000000000..ff3a797db70 --- /dev/null +++ b/regression-test/suites/doc/external/jdbc/clickhouse.md.groovy @@ -0,0 +1,41 @@ +// 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. + +suite("clickhouse.md", "p0,external,clickhouse,external_docker,external_docker_clickhouse") { + String enabled = context.config.otherConfigs.get("enableJdbcTest") + if (enabled != null && enabled.equalsIgnoreCase("true")) { + String catalog_name = "clickhouse_catalog_md"; + String clickhouse_port = context.config.otherConfigs.get("clickhouse_22_port"); + String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") + String s3_endpoint = getS3Endpoint() + String bucket = getS3BucketName() + String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/clickhouse-jdbc-0.4.6-all.jar" + + sql """ drop catalog if exists ${catalog_name} """ + + sql """ create catalog if not exists ${catalog_name} properties( + "type"="jdbc", + "user"="default", + "password"="123456", + "jdbc_url" = "jdbc:clickhouse://${externalEnvIp}:${clickhouse_port}/doris_test", + "driver_url" = "${driver_url}", + "driver_class" = "com.clickhouse.jdbc.ClickHouseDriver" + );""" + + sql """ drop catalog if exists ${catalog_name} """ + } +} diff --git a/regression-test/suites/doc/external/jdbc/ibmdb2.md.groovy b/regression-test/suites/doc/external/jdbc/ibmdb2.md.groovy new file mode 100644 index 00000000000..5979c651a8d --- /dev/null +++ b/regression-test/suites/doc/external/jdbc/ibmdb2.md.groovy @@ -0,0 +1,41 @@ +// 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. + +suite("ibmdb2.md", "p0,external,db2,external_docker,external_docker_db2") { + String enabled = context.config.otherConfigs.get("enableJdbcTest") + if (enabled != null && enabled.equalsIgnoreCase("true")) { + String catalog_name = "db2_catalog_md"; + String db2_port = context.config.otherConfigs.get("db2_11_port"); + String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") + String s3_endpoint = getS3Endpoint() + String bucket = getS3BucketName() + String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/jcc-11.5.8.0.jar" + + sql """drop catalog if exists ${catalog_name} """ + + sql """create catalog if not exists ${catalog_name} properties( + "type"="jdbc", + "user"="db2inst1", + "password"="123456", + "jdbc_url" = "jdbc:db2://${externalEnvIp}:${db2_port}/doris", + "driver_url" = "${driver_url}", + "driver_class" = "com.ibm.db2.jcc.DB2Driver" + );""" + + sql """ drop catalog if exists ${catalog_name} """ + } +} diff --git a/regression-test/suites/doc/external/jdbc/mysql.md.groovy b/regression-test/suites/doc/external/jdbc/mysql.md.groovy new file mode 100644 index 00000000000..41581769b52 --- /dev/null +++ b/regression-test/suites/doc/external/jdbc/mysql.md.groovy @@ -0,0 +1,41 @@ +// 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. + +suite("mysql.md", "p0,external,mysql,external_docker,external_docker_mysql") { + String enabled = context.config.otherConfigs.get("enableJdbcTest") + if (enabled != null && enabled.equalsIgnoreCase("true")) { + String catalog_name = "mysql_catalog_md"; + String mysql_port = context.config.otherConfigs.get("mysql_57_port"); + String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") + String s3_endpoint = getS3Endpoint() + String bucket = getS3BucketName() + String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/mysql-connector-j-8.3.0.jar" + + sql """drop catalog if exists ${catalog_name} """ + + sql """create catalog if not exists ${catalog_name} properties( + "type"="jdbc", + "user"="root", + "password"="123456", + "jdbc_url" = "jdbc:mysql://${externalEnvIp}:${mysql_port}", + "driver_url" = "${driver_url}", + "driver_class" = "com.mysql.cj.jdbc.Driver" + );""" + + sql """drop catalog if exists ${catalog_name} """ + } +} diff --git a/regression-test/suites/doc/external/jdbc/oceanbase.md.groovy b/regression-test/suites/doc/external/jdbc/oceanbase.md.groovy new file mode 100644 index 00000000000..dd8c3284ef1 --- /dev/null +++ b/regression-test/suites/doc/external/jdbc/oceanbase.md.groovy @@ -0,0 +1,41 @@ +// 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. + +suite("oceanbase.md", "p0,external,oceanbase,external_docker,external_docker_oceanbase") { + String enabled = context.config.otherConfigs.get("enableJdbcTest") + if (enabled != null && enabled.equalsIgnoreCase("true")) { + String catalog_name = "oceanbase_catalog_md"; + String oceanbase_port = context.config.otherConfigs.get("oceanbase_port"); + String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") + String s3_endpoint = getS3Endpoint() + String bucket = getS3BucketName() + String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/oceanbase-client-2.4.8.jar" + + sql """drop catalog if exists ${catalog_name} """ + + sql """create catalog if not exists ${catalog_name} properties( + "type"="jdbc", + "user"="root@test", + "password"="", + "jdbc_url" = "jdbc:oceanbase://${externalEnvIp}:${oceanbase_port}/doris_test", + "driver_url" = "${driver_url}", + "driver_class" = "com.oceanbase.jdbc.Driver" + );""" + + sql """drop catalog if exists ${catalog_name} """ + } +} diff --git a/regression-test/suites/doc/external/jdbc/oracle.md.groovy b/regression-test/suites/doc/external/jdbc/oracle.md.groovy new file mode 100644 index 00000000000..a387ee94342 --- /dev/null +++ b/regression-test/suites/doc/external/jdbc/oracle.md.groovy @@ -0,0 +1,42 @@ +// 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. + +suite("oracle.md", "p0,external,oracle,external_docker,external_docker_oracle") { + String enabled = context.config.otherConfigs.get("enableJdbcTest") + if (enabled != null && enabled.equalsIgnoreCase("true")) { + String catalog_name = "oracle_catalog_md"; + String oracle_port = context.config.otherConfigs.get("oracle_11_port"); + String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") + String SID = "XE"; + String s3_endpoint = getS3Endpoint() + String bucket = getS3BucketName() + String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/ojdbc8.jar" + + sql """drop catalog if exists ${catalog_name} """ + + sql """create catalog if not exists ${catalog_name} properties( + "type"="jdbc", + "user"="doris_test", + "password"="123456", + "jdbc_url" = "jdbc:oracle:thin:@${externalEnvIp}:${oracle_port}:${SID}", + "driver_url" = "${driver_url}", + "driver_class" = "oracle.jdbc.driver.OracleDriver" + );""" + + sql """drop catalog if exists ${catalog_name} """ + } +} diff --git a/regression-test/suites/doc/external/jdbc/postgresql.md.groovy b/regression-test/suites/doc/external/jdbc/postgresql.md.groovy new file mode 100644 index 00000000000..12c2a3ed023 --- /dev/null +++ b/regression-test/suites/doc/external/jdbc/postgresql.md.groovy @@ -0,0 +1,41 @@ +// 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. + +suite("postgresql.md", "p0,external,postgresql,external_docker,external_docker_postgresql") { + String enabled = context.config.otherConfigs.get("enableJdbcTest") + if (enabled != null && enabled.equalsIgnoreCase("true")) { + String catalog_name = "pg_catalog_md"; + String pg_port = context.config.otherConfigs.get("pg_14_port"); + String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") + String s3_endpoint = getS3Endpoint() + String bucket = getS3BucketName() + String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/postgresql-42.5.6.jar" + + sql """drop catalog if exists ${catalog_name} """ + + sql """create catalog if not exists ${catalog_name} properties( + "type"="jdbc", + "user"="postgres", + "password"="123456", + "jdbc_url" = "jdbc:postgresql://${externalEnvIp}:${pg_port}/postgres", + "driver_url" = "${driver_url}", + "driver_class" = "org.postgresql.Driver" + );""" + + sql """drop catalog if exists ${catalog_name} """ + } +} diff --git a/regression-test/suites/doc/external/jdbc/saphana.md.groovy b/regression-test/suites/doc/external/jdbc/saphana.md.groovy new file mode 100644 index 00000000000..901a15f1f5d --- /dev/null +++ b/regression-test/suites/doc/external/jdbc/saphana.md.groovy @@ -0,0 +1,44 @@ +// 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. + +suite("saphana.md", "p0,external,saphana,external_docker,external_docker_saphana") { + String enabled = context.config.otherConfigs.get("enableJdbcTest") + if (enabled != null && enabled.equalsIgnoreCase("true")) { + String catalog_name = "saphana_catalog_md"; + String saphana_port = context.config.otherConfigs.get("saphana_port"); + String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") + String s3_endpoint = getS3Endpoint() + String bucket = getS3BucketName() + String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/ngdbc-2.4.51.jar" + + +// Not testing yet because there is no docker environment for saphana + +// sql """drop catalog if exists ${catalog_name} """ +// +// sql """create catalog if not exists ${catalog_name} properties( +// "type"="jdbc", +// "user"="USERNAME", +// "password"="PASSWORD", +// "jdbc_url" = "jdbc:sap://Hostname:Port/?optionalparameters", +// "driver_url" = "ngdbc-2.4.51.jar", +// "driver_class" = "com.sap.db.jdbc.Driver" +// );""" +// +// sql """drop catalog if exists ${catalog_name} """ + } +} diff --git a/regression-test/suites/doc/external/jdbc/sqlserver.md.groovy b/regression-test/suites/doc/external/jdbc/sqlserver.md.groovy new file mode 100644 index 00000000000..0ba7e146ae9 --- /dev/null +++ b/regression-test/suites/doc/external/jdbc/sqlserver.md.groovy @@ -0,0 +1,41 @@ +// 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. + +suite("sqlserver.md", "p0,external,sqlserver,external_docker,external_docker_sqlserver") { + String enabled = context.config.otherConfigs.get("enableJdbcTest") + if (enabled != null && enabled.equalsIgnoreCase("true")) { + String catalog_name = "sqlserver_catalog_md"; + String sqlserver_port = context.config.otherConfigs.get("sqlserver_2022_port"); + String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") + String s3_endpoint = getS3Endpoint() + String bucket = getS3BucketName() + String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/mssql-jdbc-11.2.3.jre8.jar" + + sql """ drop catalog if exists ${catalog_name} """ + + sql """ create catalog if not exists ${catalog_name} properties( + "type"="jdbc", + "user"="sa", + "password"="Doris123456", + "jdbc_url" = "jdbc:sqlserver://${externalEnvIp}:${sqlserver_port};databaseName=doris_test;encrypt=false;", + "driver_url" = "${driver_url}", + "driver_class" = "com.microsoft.sqlserver.jdbc.SQLServerDriver" + );""" + + sql """drop catalog if exists ${catalog_name} """ + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org