You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2021/03/30 11:42:43 UTC

[shardingsphere] branch master updated: Fixes privilege node path (#9882)

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

zhangyonglun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new eb263e5  Fixes privilege node path (#9882)
eb263e5 is described below

commit eb263e578be644ca58bc2e8f2918ae4bd8188330
Author: Haoran Meng <me...@gmail.com>
AuthorDate: Tue Mar 30 19:42:05 2021 +0800

    Fixes privilege node path (#9882)
---
 .../shardingsphere/governance/core/registry/RegistryCenterNode.java | 6 +++---
 .../governance/core/registry/RegistryCenterNodeTest.java            | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterNode.java b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterNode.java
index c5fe9de..e2f0f41 100644
--- a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterNode.java
+++ b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterNode.java
@@ -255,12 +255,12 @@ public final class RegistryCenterNode {
     }
     
     /**
-     * Get authenticationnodes path.
+     * Get privilege node path.
      *
-     * @return authenticationnodes path
+     * @return privilege node path
      */
     public String getPrivilegeNodePath() {
-        return Joiner.on(PATH_SEPARATOR).join(ROOT, PRIVILEGE_NODE);
+        return Joiner.on(PATH_SEPARATOR).join("", ROOT, PRIVILEGE_NODE);
     }
     
     /**
diff --git a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterNodeTest.java b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterNodeTest.java
index 36e1cc1..75279c8 100644
--- a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterNodeTest.java
+++ b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterNodeTest.java
@@ -112,4 +112,9 @@ public final class RegistryCenterNodeTest {
     public void assertGetTablePath() {
         assertThat(registryCenterNode.getMetadataSchemaPath("sharding_db"), is("/metadata/sharding_db/schema"));
     }
+    
+    @Test
+    public void assertGetPrivilegeNodePath() {
+        assertThat(registryCenterNode.getPrivilegeNodePath(), is("/states/privilegenode"));
+    }
 }