Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.apache.iotdb.common.rpc.thrift.TSStatus;
import org.apache.iotdb.commons.client.sync.SyncConfigNodeIServiceClient;
import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant;
import org.apache.iotdb.confignode.rpc.thrift.TCreatePipeReq;
import org.apache.iotdb.db.it.utils.TestUtils;
import org.apache.iotdb.it.env.cluster.node.DataNodeWrapper;
Expand Down Expand Up @@ -303,7 +304,10 @@ public void testAuthExclusion() throws Exception {
TestUtils.executeNonQuery(senderEnv, "create user `ln_write_user` 'write_pwd123456'", null);

TestUtils.assertDataAlwaysOnEnv(
receiverEnv, "list user", "UserId,User,", Collections.singleton("0,root,"));
receiverEnv,
"list user",
ColumnHeaderConstant.USER_ID + "," + ColumnHeaderConstant.USER + ",",
Collections.singleton("0,root,"));
}
}

Expand Down Expand Up @@ -350,7 +354,14 @@ public void testAuthInclusionWithPattern() throws Exception {
TestUtils.assertDataEventuallyOnEnv(
receiverEnv,
"LIST PRIVILEGES OF USER ln_write_user",
"Role,Scope,Privileges,GrantOption,",
ColumnHeaderConstant.ROLE
+ ","
+ ColumnHeaderConstant.SCOPE
+ ","
+ ColumnHeaderConstant.PRIVILEGES
+ ","
+ ColumnHeaderConstant.GRANT_OPTION
+ ",",
new HashSet<>(
Arrays.asList(
",,SYSTEM,true,",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.apache.iotdb.common.rpc.thrift.TSStatus;
import org.apache.iotdb.commons.client.sync.SyncConfigNodeIServiceClient;
import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant;
import org.apache.iotdb.confignode.rpc.thrift.TCreatePipeReq;
import org.apache.iotdb.consensus.ConsensusFactory;
import org.apache.iotdb.db.it.utils.TestUtils;
Expand Down Expand Up @@ -191,7 +192,7 @@ private void assertUserEventuallyExists(final String username) {
final ResultSet resultSet = statement.executeQuery("list user")) {
boolean found = false;
while (resultSet.next()) {
if (username.equals(resultSet.getString("User"))) {
if (username.equals(resultSet.getString(ColumnHeaderConstant.USER))) {
found = true;
break;
}
Expand Down Expand Up @@ -256,7 +257,7 @@ public void testNoPermission() throws Exception {
TestUtils.assertDataAlwaysOnEnv(
receiverEnv,
"list user",
"UserId,User,",
ColumnHeaderConstant.USER_ID + "," + ColumnHeaderConstant.USER + ",",
new HashSet<>(Arrays.asList("0,root,", "10000,thulab,")));
}
}
Expand Down
Loading