public void TestEtcdSimpleSetAndAdd() { if (!CheckEtcdRunning()) { Assert.Ignore(); return; } var respSet = etcd.Set("csharp-etcetera-test", "123"); Assert.AreEqual(respSet.Node.Value, "123"); var respGet = etcd.Get("csharp-etcetera-test"); Assert.AreEqual(respGet.Node.Value, "123"); }
public Task <EtcdResponse> SetAsync(string key, string value) { TaskCompletionSource <EtcdResponse> tcs = new TaskCompletionSource <EtcdResponse>(); Task.Factory.StartNew(() => { tcs.SetResult(_etcdClient.Set(key, value)); }); return(tcs.Task); }
public static void Configure(ServiceConfiguration config) { //ServiceEndpoint se = new ServiceEndpoint(new ContractDescription("IService1"), new BasicHttpBinding(), new EndpointAddress("http://localhost/testservice/service1.svc")); //se.Behaviors.Add(new MyEndpointBehavior()); //config.AddServiceEndpoint(se); config.Description.Behaviors.Add(new ServiceMetadataBehavior { HttpGetEnabled = true }); config.Description.Behaviors.Add(new ServiceDebugBehavior { IncludeExceptionDetailInFaults = true }); var etcd = new EtcdClient(new Uri("http://localhost:4001/v2/keys/")); etcd.Set("local/EtcdPrototype.IService1/url", config.BaseAddresses.First().ToString()); // etcd.Set("local/EtcdPrototype.IService1/binding",config.) }
public static void InsertSomeTestData() { _client.Set("/appconfig/internportalen/dbConnectionString", "db-01.bekk.no;Database=internportalen;user:foo;password:bar"); _client.Set("/appconfig/internportalen/apikey", "some-secret-api-key"); }
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 CanDeleteKeys() { _etcdClient = new EtcdClient(new Uri("http://192.168.101.1:4001/")); _response = _etcdClient.Set(_key.ToString(), "wassup"); _deleteResponse = _etcdClient.Delete(_key.ToString()); }
public CanSetKeysWithTtl() { _etcdClient = new EtcdClient(new Uri("http://192.168.101.1:4001/")); _response = _etcdClient.Set(_key.ToString(), "wassup", _ttl); _now = DateTime.Now; }
public CanSetKeys() { _etcdClient = new EtcdClient(new Uri("http://192.168.101.1:4001/")); _response = _etcdClient.Set("dru", "wassup"); }
public CanHandleExpiredKeys() { _etcdClient = new EtcdClient(new Uri("http://192.168.101.1:4001/")); _etcdClient.Set(_key.ToString(), "wassup", _ttl); }
public CanGetKeys() { _etcdClient = new EtcdClient(new Uri("http://192.168.101.1:4001/")); _response = _etcdClient.Set(_key.ToString(), "wassup"); _getResponse = _etcdClient.Get(_key.ToString()); }
public KeysWithSlashes() { _etcdClient = new EtcdClient(new Uri("http://192.168.101.1:4001/")); _response = _etcdClient.Set("/folder1/bill", "wassup"); }
public TrimUserSuppliedPath() { _etcdClient = new EtcdClient(new Uri("http://192.168.101.1:4001/v2/keys")); _response = _etcdClient.Set("dru", "wassup"); }