This is an automated email from the ASF dual-hosted git repository.

hellostephen 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 faa9da36b4b [enhancement][fix] update storage vault case for upgrade 
test (#43948)
faa9da36b4b is described below

commit faa9da36b4baede0402a66dddb4bbca97a0190ab
Author: MoanasDaddyXu <[email protected]>
AuthorDate: Wed Nov 20 14:34:13 2024 +0800

    [enhancement][fix] update storage vault case for upgrade test (#43948)
    
    ### What problem does this PR solve?
    
    Issue Number: close #xxx
    
    Related PR: #xxx
    
    Problem Summary:
    To adapt for the upgrade test, split this test case into two
---
 .../{test_create_vault.groovy => load.groovy}      |  96 +++++++--------
 .../vault_p0/create/test_create_vault.groovy       | 135 ---------------------
 2 files changed, 48 insertions(+), 183 deletions(-)

diff --git a/regression-test/suites/vault_p0/create/test_create_vault.groovy 
b/regression-test/suites/vault_p0/create/load.groovy
similarity index 71%
copy from regression-test/suites/vault_p0/create/test_create_vault.groovy
copy to regression-test/suites/vault_p0/create/load.groovy
index 13c9f8d8283..58974856db5 100644
--- a/regression-test/suites/vault_p0/create/test_create_vault.groovy
+++ b/regression-test/suites/vault_p0/create/load.groovy
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-suite("test_create_vault", "nonConcurrent") {
+suite("create_storage_vault", "nonConcurrent") {
     if (!isCloudMode()) {
         logger.info("skip test_create_vault case because not cloud mode")
         return
@@ -129,45 +129,45 @@ suite("test_create_vault", "nonConcurrent") {
         """
     }, "already created")
 
-    sql """
-        CREATE TABLE IF NOT EXISTS create_table_use_s3_vault (
-            C_CUSTKEY     INTEGER NOT NULL,
-            C_NAME        INTEGER NOT NULL
-        )
-        DUPLICATE KEY(C_CUSTKEY, C_NAME)
-        DISTRIBUTED BY HASH(C_CUSTKEY) BUCKETS 1
-        PROPERTIES (
-            "replication_num" = "1",
-            "storage_vault_name" = "create_s3_vault"
-        )
-    """
+    // sql """
+    //     CREATE TABLE IF NOT EXISTS create_table_use_s3_vault (
+    //         C_CUSTKEY     INTEGER NOT NULL,
+    //         C_NAME        INTEGER NOT NULL
+    //     )
+    //     DUPLICATE KEY(C_CUSTKEY, C_NAME)
+    //     DISTRIBUTED BY HASH(C_CUSTKEY) BUCKETS 1
+    //     PROPERTIES (
+    //         "replication_num" = "1",
+    //         "storage_vault_name" = "create_s3_vault"
+    //     )
+    // """
 
-    sql """ insert into create_table_use_s3_vault values(1,1); """
+    // sql """ insert into create_table_use_s3_vault values(1,1); """
 
-    sql """ select * from create_table_use_s3_vault; """
+    // sql """ select * from create_table_use_s3_vault; """
 
 
-    def vaults_info = try_sql """ show storage vault """
+    // def vaults_info = try_sql """ show storage vault """
 
     
-    boolean create_hdfs_vault_exist = false;
-    boolean create_s3_vault_exist = false;
-    boolean built_in_storage_vault_exist = false;
-    for (int i = 0; i < vaults_info.size(); i++) {
-        def name = vaults_info[i][0]
-        if (name.equals("create_hdfs_vault")) {
-            create_hdfs_vault_exist = true;
-        }
-        if (name.equals("create_s3_vault")) {
-            create_s3_vault_exist = true;
-        }
-        if (name.equals("built_in_storage_vault")) {
-            built_in_storage_vault_exist = true
-        }
-    }
-    assertTrue(create_hdfs_vault_exist)
-    assertTrue(create_s3_vault_exist)
-    assertTrue(built_in_storage_vault_exist)
+    // boolean create_hdfs_vault_exist = false;
+    // boolean create_s3_vault_exist = false;
+    // boolean built_in_storage_vault_exist = false;
+    // for (int i = 0; i < vaults_info.size(); i++) {
+    //     def name = vaults_info[i][0]
+    //     if (name.equals("create_hdfs_vault")) {
+    //         create_hdfs_vault_exist = true;
+    //     }
+    //     if (name.equals("create_s3_vault")) {
+    //         create_s3_vault_exist = true;
+    //     }
+    //     if (name.equals("built_in_storage_vault")) {
+    //         built_in_storage_vault_exist = true
+    //     }
+    // }
+    // assertTrue(create_hdfs_vault_exist)
+    // assertTrue(create_s3_vault_exist)
+    // assertTrue(built_in_storage_vault_exist)
 
     expectExceptionLike({
         sql """
@@ -187,18 +187,18 @@ suite("test_create_vault", "nonConcurrent") {
     }, "already created")
 
 
-    expectExceptionLike({
-        sql """
-            CREATE TABLE IF NOT EXISTS create_table_with_not_exist_vault (
-                C_CUSTKEY     INTEGER NOT NULL,
-                C_NAME        INTEGER NOT NULL
-            )
-            DUPLICATE KEY(C_CUSTKEY, C_NAME)
-            DISTRIBUTED BY HASH(C_CUSTKEY) BUCKETS 1
-            PROPERTIES (
-                "replication_num" = "1",
-                "storage_vault_name" = "not_exist_vault"
-            )
-        """
-    }, "Storage vault 'not_exist_vault' does not exist")
+    // expectExceptionLike({
+    //     sql """
+    //         CREATE TABLE IF NOT EXISTS create_table_with_not_exist_vault (
+    //             C_CUSTKEY     INTEGER NOT NULL,
+    //             C_NAME        INTEGER NOT NULL
+    //         )
+    //         DUPLICATE KEY(C_CUSTKEY, C_NAME)
+    //         DISTRIBUTED BY HASH(C_CUSTKEY) BUCKETS 1
+    //         PROPERTIES (
+    //             "replication_num" = "1",
+    //             "storage_vault_name" = "not_exist_vault"
+    //         )
+    //     """
+    // }, "Storage vault 'not_exist_vault' does not exist")
 }
diff --git a/regression-test/suites/vault_p0/create/test_create_vault.groovy 
b/regression-test/suites/vault_p0/create/test_create_vault.groovy
index 13c9f8d8283..6bacf27fa5a 100644
--- a/regression-test/suites/vault_p0/create/test_create_vault.groovy
+++ b/regression-test/suites/vault_p0/create/test_create_vault.groovy
@@ -26,109 +26,6 @@ suite("test_create_vault", "nonConcurrent") {
         return
     }
 
-    expectExceptionLike({
-        sql """
-            CREATE STORAGE VAULT IF NOT EXISTS failed_vault
-            PROPERTIES (
-                "type"="S3",
-                "fs.defaultFS"="${getHmsHdfsFs()}",
-                "path_prefix" = "ssb_sf1_p2",
-                "hadoop.username" = "hadoop"
-            );
-           """
-    }, "Missing [s3.endpoint] in properties")
-
-    expectExceptionLike({
-        sql """
-            CREATE STORAGE VAULT IF NOT EXISTS failed_vault
-            PROPERTIES (
-                "type"="hdfs",
-                "s3.bucket"="${getHmsHdfsFs()}",
-                "path_prefix" = "ssb_sf1_p2",
-                "hadoop.username" = "hadoop"
-            );
-            """
-    }, "invalid fs_name")
-
-    expectExceptionLike({
-        sql """ CREATE STORAGE VAULT IF NOT EXISTS failed_vault PROPERTIES (); 
"""
-    }, "mismatched input ')'")
-
-
-    sql """
-        CREATE STORAGE VAULT IF NOT EXISTS create_hdfs_vault
-        PROPERTIES (
-            "type"="hdfs",
-            "fs.defaultFS"="${getHmsHdfsFs()}",
-            "path_prefix" = "default_vault_ssb_hdfs_vault",
-            "hadoop.username" = "hadoop"
-        );
-        """
-
-    try_sql """ DROP TABLE IF EXISTS create_table_use_vault FORCE; """
-
-    sql """
-        CREATE TABLE IF NOT EXISTS create_table_use_vault (
-                C_CUSTKEY     INTEGER NOT NULL,
-                C_NAME        INTEGER NOT NULL
-        )
-        DUPLICATE KEY(C_CUSTKEY, C_NAME)
-        DISTRIBUTED BY HASH(C_CUSTKEY) BUCKETS 1
-        PROPERTIES (
-            "replication_num" = "1",
-            "storage_vault_name" = "create_hdfs_vault"
-        )
-        """
-
-    String create_stmt = sql """ SHOW CREATE TABLE create_table_use_vault """
-
-    logger.info("the create table stmt is ${create_stmt}")
-    assertTrue(create_stmt.contains("create_hdfs_vault"))
-
-    expectExceptionLike({
-        sql """
-            CREATE STORAGE VAULT create_hdfs_vault
-            PROPERTIES (
-                "type"="hdfs",
-                "fs.defaultFS"="${getHmsHdfsFs()}",
-                "path_prefix" = "default_vault_ssb_hdfs_vault"
-            );
-        """
-    }, "already created")
-
-
-    sql """
-        CREATE STORAGE VAULT IF NOT EXISTS create_s3_vault
-        PROPERTIES (
-            "type"="S3",
-            "s3.endpoint"="${getS3Endpoint()}",
-            "s3.region" = "${getS3Region()}",
-            "s3.access_key" = "${getS3AK()}",
-            "s3.secret_key" = "${getS3SK()}",
-            "s3.root.path" = "test_create_s3_vault",
-            "s3.bucket" = "${getS3BucketName()}",
-            "s3.external_endpoint" = "",
-            "provider" = "${getS3Provider()}"
-        );
-    """
-
-    expectExceptionLike({
-        sql """
-            CREATE STORAGE VAULT create_s3_vault
-            PROPERTIES (
-                "type"="S3",
-                "s3.endpoint"="${getS3Endpoint()}",
-                "s3.region" = "${getS3Region()}",
-                "s3.access_key" = "${getS3AK()}",
-                "s3.secret_key" = "${getS3SK()}",
-                "s3.root.path" = "test_create_s3_vault",
-                "s3.bucket" = "${getS3BucketName()}",
-                "s3.external_endpoint" = "",
-                "provider" = "${getS3Provider()}"
-            );
-        """
-    }, "already created")
-
     sql """
         CREATE TABLE IF NOT EXISTS create_table_use_s3_vault (
             C_CUSTKEY     INTEGER NOT NULL,
@@ -169,36 +66,4 @@ suite("test_create_vault", "nonConcurrent") {
     assertTrue(create_s3_vault_exist)
     assertTrue(built_in_storage_vault_exist)
 
-    expectExceptionLike({
-        sql """
-            CREATE STORAGE VAULT built_in_storage_vault
-            PROPERTIES (
-                "type"="S3",
-                "s3.endpoint"="${getS3Endpoint()}",
-                "s3.region" = "${getS3Region()}",
-                "s3.access_key" = "${getS3AK()}",
-                "s3.secret_key" = "${getS3SK()}",
-                "s3.root.path" = "test_built_in_storage_vault",
-                "s3.bucket" = "${getS3BucketName()}",
-                "s3.external_endpoint" = "",
-                "provider" = "${getS3Provider()}"
-            );
-        """
-    }, "already created")
-
-
-    expectExceptionLike({
-        sql """
-            CREATE TABLE IF NOT EXISTS create_table_with_not_exist_vault (
-                C_CUSTKEY     INTEGER NOT NULL,
-                C_NAME        INTEGER NOT NULL
-            )
-            DUPLICATE KEY(C_CUSTKEY, C_NAME)
-            DISTRIBUTED BY HASH(C_CUSTKEY) BUCKETS 1
-            PROPERTIES (
-                "replication_num" = "1",
-                "storage_vault_name" = "not_exist_vault"
-            )
-        """
-    }, "Storage vault 'not_exist_vault' does not exist")
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to