public virtual void TestZookeeperCanWrite() { Runtime.SetProperty("curator-log-events", "true"); StartSecureZK(); CuratorService curator = null; LoginContext login = Login(ZookeeperLocalhost, ZookeeperClientContext, keytab_zk); try { LogLoginDetails(Zookeeper, login); RegistrySecurity.SetZKSaslClientProperties(Zookeeper, ZookeeperClientContext); curator = StartCuratorServiceInstance("ZK", true); Log.Info(curator.ToString()); AddToTeardown(curator); curator.ZkMkPath("/", CreateMode.Persistent, false, RegistrySecurity.WorldReadWriteACL ); curator.ZkList("/"); curator.ZkMkPath("/zookeeper", CreateMode.Persistent, false, RegistrySecurity.WorldReadWriteACL ); } finally { Logout(login); ServiceOperations.Stop(curator); } }
public virtual void TestInsecureClientToZK() { StartSecureZK(); UserZookeeperToCreateRoot(); RegistrySecurity.ClearZKSaslClientProperties(); CuratorService curatorService = StartCuratorServiceInstance("insecure client", false ); curatorService.ZkList("/"); curatorService.ZkMkPath(string.Empty, CreateMode.Persistent, false, RegistrySecurity .WorldReadWriteACL); }
/// <exception cref="System.IO.IOException"/> private void MkPath(string path, CreateMode mode) { curatorService.ZkMkPath(path, mode, false, RegistrySecurity.WorldReadWriteACL); }