This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new aa82455d1d0 [test](case)modify the cases to be compatible with cloud
mode (#37315)
aa82455d1d0 is described below
commit aa82455d1d08ac5dee7409a2e38ecce5184e2b65
Author: chunping <[email protected]>
AuthorDate: Fri Jul 5 11:40:58 2024 +0800
[test](case)modify the cases to be compatible with cloud mode (#37315)
---
regression-test/data/cloud_p0/cache/ttl/test_show_ttl.out | 4 ++--
regression-test/suites/auth_up_down_p0/load.groovy | 7 +++++++
.../suites/cloud_p0/auth/test_grant_revoke_cluster_role.groovy | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/regression-test/data/cloud_p0/cache/ttl/test_show_ttl.out
b/regression-test/data/cloud_p0/cache/ttl/test_show_ttl.out
index e106e5c50ed..eb7c57f60c1 100644
--- a/regression-test/data/cloud_p0/cache/ttl/test_show_ttl.out
+++ b/regression-test/data/cloud_p0/cache/ttl/test_show_ttl.out
@@ -6,11 +6,11 @@
0
-- !test_show_ttl_3 --
-customer_ttl CREATE TABLE `customer_ttl` (\n `C_CUSTKEY` INT NOT NULL,\n
`C_NAME` VARCHAR(25) NOT NULL,\n `C_ADDRESS` VARCHAR(40) NOT NULL,\n
`C_NATIONKEY` INT NOT NULL,\n `C_PHONE` CHAR(15) NOT NULL,\n `C_ACCTBAL`
DECIMAL(15, 2) NOT NULL,\n `C_MKTSEGMENT` CHAR(10) NOT NULL,\n `C_COMMENT`
VARCHAR(117) NOT NULL\n) ENGINE=OLAP\nDUPLICATE KEY(`C_CUSTKEY`,
`C_NAME`)\nCOMMENT 'OLAP'\nDISTRIBUTED BY HASH(`C_CUSTKEY`) BUCKETS
32\nPROPERTIES (\n"file_cache_ttl_seconds" = "300",\n"is_bein [...]
+customer_ttl CREATE TABLE `customer_ttl` (\n `C_CUSTKEY` INT NOT NULL,\n
`C_NAME` VARCHAR(25) NOT NULL,\n `C_ADDRESS` VARCHAR(40) NOT NULL,\n
`C_NATIONKEY` INT NOT NULL,\n `C_PHONE` CHAR(15) NOT NULL,\n `C_ACCTBAL`
DECIMAL(15, 2) NOT NULL,\n `C_MKTSEGMENT` CHAR(10) NOT NULL,\n `C_COMMENT`
VARCHAR(117) NOT NULL\n) ENGINE=OLAP\nDUPLICATE KEY(`C_CUSTKEY`,
`C_NAME`)\nCOMMENT 'OLAP'\nDISTRIBUTED BY HASH(`C_CUSTKEY`) BUCKETS
32\nPROPERTIES (\n"file_cache_ttl_seconds" = "300",\n"is_bein [...]
-- !test_show_ttl_4 --
0
-- !test_show_ttl_5 --
-customer_ttl CREATE TABLE `customer_ttl` (\n `C_CUSTKEY` INT NOT NULL,\n
`C_NAME` VARCHAR(25) NOT NULL,\n `C_ADDRESS` VARCHAR(40) NOT NULL,\n
`C_NATIONKEY` INT NOT NULL,\n `C_PHONE` CHAR(15) NOT NULL,\n `C_ACCTBAL`
DECIMAL(15, 2) NOT NULL,\n `C_MKTSEGMENT` CHAR(10) NOT NULL,\n `C_COMMENT`
VARCHAR(117) NOT NULL\n) ENGINE=OLAP\nDUPLICATE KEY(`C_CUSTKEY`,
`C_NAME`)\nCOMMENT 'OLAP'\nDISTRIBUTED BY HASH(`C_CUSTKEY`) BUCKETS
32\nPROPERTIES (\n"file_cache_ttl_seconds" = "0",\n"is_being_ [...]
+customer_ttl CREATE TABLE `customer_ttl` (\n `C_CUSTKEY` INT NOT NULL,\n
`C_NAME` VARCHAR(25) NOT NULL,\n `C_ADDRESS` VARCHAR(40) NOT NULL,\n
`C_NATIONKEY` INT NOT NULL,\n `C_PHONE` CHAR(15) NOT NULL,\n `C_ACCTBAL`
DECIMAL(15, 2) NOT NULL,\n `C_MKTSEGMENT` CHAR(10) NOT NULL,\n `C_COMMENT`
VARCHAR(117) NOT NULL\n) ENGINE=OLAP\nDUPLICATE KEY(`C_CUSTKEY`,
`C_NAME`)\nCOMMENT 'OLAP'\nDISTRIBUTED BY HASH(`C_CUSTKEY`) BUCKETS
32\nPROPERTIES (\n"file_cache_ttl_seconds" = "0",\n"is_being_ [...]
diff --git a/regression-test/suites/auth_up_down_p0/load.groovy
b/regression-test/suites/auth_up_down_p0/load.groovy
index 9a0d2b38d36..b03d25fb186 100644
--- a/regression-test/suites/auth_up_down_p0/load.groovy
+++ b/regression-test/suites/auth_up_down_p0/load.groovy
@@ -41,6 +41,13 @@ suite("test_upgrade_downgrade_prepare_auth","p0,auth") {
sql """CREATE USER '${user2}' IDENTIFIED BY '${pwd}'"""
sql """grant select_priv on regression_test to ${user1}"""
sql """grant select_priv on regression_test to ${user2}"""
+ if (isCloudMode()) {
+ //grant cluster to user
+ def res = sql_return_maparray "show clusters;"
+ logger.info("show clusters from ${res}")
+ sql """GRANT USAGE_PRIV ON CLUSTER "${res[0].cluster}" TO "${user1}";
"""
+ sql """GRANT USAGE_PRIV ON CLUSTER "${res[0].cluster}" TO "${user2}";
"""
+ }
sql """CREATE ROLE ${role1}"""
sql """CREATE ROLE ${role2}"""
diff --git
a/regression-test/suites/cloud_p0/auth/test_grant_revoke_cluster_role.groovy
b/regression-test/suites/cloud_p0/auth/test_grant_revoke_cluster_role.groovy
index ef61f802ae5..c863b4539d4 100644
--- a/regression-test/suites/cloud_p0/auth/test_grant_revoke_cluster_role.groovy
+++ b/regression-test/suites/cloud_p0/auth/test_grant_revoke_cluster_role.groovy
@@ -117,7 +117,7 @@ suite("test_grant_revoke_cluster_stage_to_role",
"cloud_auth") {
"""
result = sql_return_maparray """show grants for '${user1}'"""
commonAuth result, "'${user1}'@'%'", "Yes", "testRole", "Select_priv"
- assertEquals("[$testClusterA: Cluster_usage_priv; $validCluster:
Cluster_usage_priv]" as String, result.CloudClusterPrivs as String)
+ assertEquals("[$validCluster: Cluster_usage_priv; $testClusterA:
Cluster_usage_priv]" as String, result.CloudClusterPrivs as String)
def db = context.dbName
sql """
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]