예제 #1
0
        // 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();
        }
예제 #2
0
        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();
        }
예제 #3
0
 protected override void FinalizeSetUp()
 {
     _db = new InfluxDb("http://192.168.99.100:8086", "root", "root");
     EnsureInfluxDbStarted();
 }
예제 #4
0
 public MachineDataRepository(string endpoint, string userName, string password)
 {
     _influxDb = new InfluxDb(endpoint, userName, password);
 }
예제 #5
0
 protected override void FinalizeSetUp()
 {
     _db = new InfluxDb("http://localhost:8086", "root", "root");
     EnsureInfluxDbStarted();
 }
예제 #6
0
 protected override void FinalizeSetUp()
 {
     _db = new InfluxDb("http://192.168.99.100:8086", "root", "root");
     EnsureInfluxDbStarted();
 }
예제 #7
0
 protected override void FinalizeSetUp()
 {
     _db = new InfluxDb("http://q0q.nl:8086", "root", "D1hwvK@rst!");
     EnsureInfluxDbStarted();
 }