private async Task GivenApplicationIsRegistered(string serviceId) { var options = new ServiceDiscoveryOptions(); options.ServiceOptions.Id = serviceId; options.ServiceOptions.Name = "Fake name"; options.ServiceOptions.Address = "10.1.1.1"; options.ServiceOptions.Port = 5555; options.ServiceOptions.HttpHealthCheck = string.Empty; options.ServiceOptions.Tags = new List <string>(); options.ServerOptions.Address = "http://127.0.0.1:8500"; var serviceDiscovery = new ServiceDiscoveryClient(null); await serviceDiscovery.RegisterAsync(options); }
private async Task WhenUserRegisterApplicationWithIdAndAddress(string serviceId, string serviceAddress) { try { var options = new ServiceDiscoveryOptions(); options.ServiceOptions.Id = serviceId; options.ServiceOptions.Name = "Fake name"; options.ServiceOptions.Address = serviceAddress; options.ServiceOptions.Port = 5555; options.ServiceOptions.HttpHealthCheck = string.Empty; options.ServiceOptions.Tags = new List <string>(); options.ServerOptions.Address = "http://127.0.0.1:8500"; var serviceDiscovery = new ServiceDiscoveryClient(null); await serviceDiscovery.RegisterAsync(options); _result = true; } catch (Exception) { _result = false; } }