Skip to content

Commit

Permalink
[fix](test) Add cloud mode computing permissions to the lower case te…
Browse files Browse the repository at this point in the history
…st user (#46765)
  • Loading branch information
zy-kkk authored Jan 13, 2025
1 parent 7ae1a23 commit 27bc0bd
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ suite("test_conflict_name", "p0,external,doris,meta_names_mapping") {

try_sql """drop user ${jdbcUser}"""
sql """create user ${jdbcUser} identified by '${jdbcPassword}'"""

//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO ${jdbcUser}""";
}

sql """grant all on *.*.* to ${jdbcUser}"""

sql """drop database if exists internal.external_conflict_name; """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ suite("test_lower_case_meta_include", "p0,external,doris,external_docker,externa

try_sql """drop user ${jdbcUser}"""
sql """create user ${jdbcUser} identified by '${jdbcPassword}'"""

//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO ${jdbcUser}""";
}

sql """grant all on *.*.* to ${jdbcUser}"""

String mapping_db = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ suite("test_lower_case_meta_show_and_select", "p0,external,doris,external_docker

try_sql """drop user ${jdbcUser}"""
sql """create user ${jdbcUser} identified by '${jdbcPassword}'"""

//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO ${jdbcUser}""";
}

sql """grant all on *.*.* to ${jdbcUser}"""

sql """drop database if exists internal.external_test_lower; """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ suite("test_lower_case_meta_with_lower_table_conf_show_and_select", "p0,external

try_sql """drop user ${jdbcUser}"""
sql """create user ${jdbcUser} identified by '${jdbcPassword}'"""

//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO ${jdbcUser}""";
}

sql """grant all on *.*.* to ${jdbcUser}"""

sql """drop database if exists internal.external_test_lower_with_conf; """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ suite("test_lower_case_mtmv", "p0,external,doris,external_docker,external_docker

try_sql """drop user ${jdbcUser}"""
sql """create user ${jdbcUser} identified by '${jdbcPassword}'"""

//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO ${jdbcUser}""";
}

sql """grant all on *.*.* to ${jdbcUser}"""

sql """drop database if exists internal.EXTERNAL_LOWER_MTMV; """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ suite("test_meta_cache_select_without_refresh", "p0,external,doris,external_dock

try_sql """drop user ${jdbcUser}"""
sql """create user ${jdbcUser} identified by '${jdbcPassword}'"""

//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO ${jdbcUser}""";
}

sql """grant all on *.*.* to ${jdbcUser}"""

sql """ drop database if exists internal.external_lower_select_without_refresh; """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ suite("test_meta_names_mapping", "p0,external,doris,meta_names_mapping") {

try_sql """drop user ${jdbcUser}"""
sql """create user ${jdbcUser} identified by '${jdbcPassword}'"""

//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO ${jdbcUser}""";
}

sql """grant all on *.*.* to ${jdbcUser}"""

String validMetaNamesMapping = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ suite("test_timing_refresh_catalog", "p0,external,doris,external_docker,external

try_sql """drop user ${jdbcUser}"""
sql """create user ${jdbcUser} identified by '${jdbcPassword}'"""

//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO ${jdbcUser}""";
}

sql """grant all on *.*.* to ${jdbcUser}"""

String mapping = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ suite("test_upgrade_lower_case_catalog_prepare", "p0,external,doris,external_doc

try_sql """drop user ${jdbcUser}"""
sql """create user ${jdbcUser} identified by '${jdbcPassword}'"""

//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO ${jdbcUser}""";
}

sql """grant all on *.*.* to ${jdbcUser}"""

sql """drop database if exists internal.upgrade_lower_case_catalog_lower; """
Expand Down

0 comments on commit 27bc0bd

Please sign in to comment.