public void TestEtcdDirSetAndAdd() { if (!CheckEtcdRunning()) { Assert.Ignore(); return; } var respSet = etcd.Set("csharp-etcetera-test-dir/sample-key", "123"); Assert.AreEqual(respSet.Node.Value, "123"); var respGet = etcd.Get("csharp-etcetera-test-dir/sample-key"); Assert.AreEqual(respGet.Node.Value, "123"); var respGetDir = etcd.Get("csharp-etcetera-test-dir"); Assert.True(respGetDir.Node.Dir); var deleteDir = etcd.DeleteDir("csharp-etcetera-test-dir"); Assert.AreEqual(deleteDir.ErrorCode, 108); // not empty dir cannot delete var deleteDirAll = etcd.DeleteDir("csharp-etcetera-test-dir", true); Assert.AreEqual(deleteDirAll.ErrorCode, null); var respGetDir2 = etcd.Get("csharp-etcetera-test-dir"); Assert.AreEqual(respGetDir2.Node, null); }
public CanDeleteDirsWithStuff() { _etcdClient = new EtcdClient(new Uri("http://192.168.101.1:4001/")); _response = _etcdClient.Set(_key+"/bob", "hi"); _deleteResponse = _etcdClient.DeleteDir(_key.ToString(), true); }
public CanDeleteDirs() { _etcdClient = new EtcdClient(new Uri("http://192.168.101.1:4001/")); _response = _etcdClient.CreateDir(_key.ToString()); _deleteResponse = _etcdClient.DeleteDir(_key.ToString()); }
public new void TearDown() { EtcdClient.DeleteDir(new Uri("v1/toggles/cacheUpdateTest/", UriKind.Relative)); }