// TODO: make async protected override void FinalizeTestFixtureSetUp() { InfluxVersion influxVersion; if (!Enum.TryParse(ConfigurationManager.AppSettings.Get("version"), out influxVersion)) influxVersion = InfluxVersion.Auto; _influx = new InfluxDb( ConfigurationManager.AppSettings.Get("url"), ConfigurationManager.AppSettings.Get("username"), ConfigurationManager.AppSettings.Get("password"), influxVersion); _influx.Should().NotBeNull(); _dbName = CreateRandomDbName(); //PurgeFakeDatabases(); var createResponse = _influx.CreateDatabaseAsync(_dbName).Result; createResponse.Success.Should().BeTrue(); // workaround for issue https://github.com/influxdb/influxdb/issues/3363 // by first creating a single point in the empty db var writeResponse = _influx.WriteAsync(_dbName, CreateMockPoints(1)); writeResponse.Result.Success.Should().BeTrue(); }
protected override async Task FinalizeSetUp() { //TODO: Have this injectable so it can be executed from the test server with different data InfluxVersion influxVersion; if (!Enum.TryParse(ConfigurationManager.AppSettings.Get("version"), out influxVersion)) { influxVersion = InfluxVersion.Auto; } _influx = new InfluxDb( ConfigurationManager.AppSettings.Get("url"), ConfigurationManager.AppSettings.Get("username"), ConfigurationManager.AppSettings.Get("password"), influxVersion); _influx.Should().NotBeNull(); _dbName = CreateRandomDbName(); //PurgeFakeDatabases(); var createResponse = _influx.CreateDatabaseAsync(_dbName).Result; createResponse.Success.Should().BeTrue(); // workaround for issue https://github.com/influxdb/influxdb/issues/3363 // by first creating a single point in the empty db var writeResponse = _influx.WriteAsync(_dbName, CreateMockPoints(1)); writeResponse.Result.Success.Should().BeTrue(); }
protected override void FinalizeSetUp() { _db = new InfluxDb("http://192.168.99.100:8086", "root", "root"); EnsureInfluxDbStarted(); }
public MachineDataRepository(string endpoint, string userName, string password) { _influxDb = new InfluxDb(endpoint, userName, password); }
protected override void FinalizeSetUp() { _db = new InfluxDb("http://localhost:8086", "root", "root"); EnsureInfluxDbStarted(); }
protected override void FinalizeSetUp() { _db = new InfluxDb("http://q0q.nl:8086", "root", "D1hwvK@rst!"); EnsureInfluxDbStarted(); }