public async Task TestGenericHeaderless() { var settings = InfluxerConfigSection.Load(Path.Combine(TestFilesPath, "HeaderlessText.conf"), true); settings.InputFileName = Path.Combine(TestFilesPath, "HeaderlessText.txt"); var client = await GetClientAsync(settings); var file = new GenericFile(); var result = await file.ProcessGenericFile(settings.InputFileName, client); //Debug.WriteLine (result.ToString ()); Assert.IsTrue(result.ExitCode == ExitCode.ProcessedWithErrors && result.PointsFound == 1001 && result.PointsFailed == 29, "Processing a generic text file failed"); }
public async Task TestGenericSimple() { var settings = InfluxerConfigSection.LoadDefault(); settings.FileFormat = FileFormats.Generic; settings.InputFileName = Path.Combine(TestFilesPath, "Simple.csv"); settings.InfluxDB.RetentionPolicy = "autogen"; settings.GenericFile.TimeFormat = "yyyy-MM-dd m:ss"; settings.InfluxDB.Measurement = "simple"; var client = await GetClientAsync(settings); var file = new GenericFile(); var result = await file.ProcessGenericFile(settings.InputFileName, client); //Debug.WriteLine (result.ToString ()); Assert.IsTrue(result.ExitCode == ExitCode.ProcessedWithErrors && result.PointsFound == 4897 && result.PointsFailed == 1, "Processing a generic CSV file failed"); }