mirror of
https://gitlab.cern.ch/wotsubo/psboard-qaqc-postprocess.git
synced 2025-07-01 17:19:29 +09:00
fix: master log parse (invalid station detection in status parse)
- missed switch for `Station1` - added integrated test to check lines count of output csv
This commit is contained in:
parent
e20c029684
commit
fb5160d2d9
2 changed files with 30 additions and 21 deletions
23
tests/cli.rs
23
tests/cli.rs
|
@ -7,6 +7,7 @@ mod integrated_test {
|
|||
|
||||
use anyhow::Result;
|
||||
use assert_cmd::Command;
|
||||
use itertools::Itertools;
|
||||
use predicates::prelude::*;
|
||||
|
||||
#[test]
|
||||
|
@ -26,17 +27,21 @@ mod integrated_test {
|
|||
|
||||
// check output
|
||||
{
|
||||
// check output content
|
||||
let f = File::open(test_out.clone())?;
|
||||
let r = BufReader::new(f);
|
||||
assert!(r
|
||||
.lines()
|
||||
.any(|line| {
|
||||
line
|
||||
.unwrap()
|
||||
.contains(
|
||||
"8866,,B-0-1,0,1,1,0,1,8,1,,7,2024-07-20T17:15:46Z,7.log,0.1.0,alice,,,,"
|
||||
)
|
||||
}));
|
||||
assert!(r.lines().any(|line| {
|
||||
line.unwrap().contains(
|
||||
"8866,,B-0-1,0,1,1,0,1,8,1,,7,2024-07-20T17:15:46Z,7.log,0.1.0,alice,,,,",
|
||||
)
|
||||
}));
|
||||
}
|
||||
{
|
||||
// Check output lines count
|
||||
let f = File::open(test_out.clone())?;
|
||||
let r = BufReader::new(f);
|
||||
let lc = r.lines().collect_vec().len();
|
||||
assert_eq!(lc, 19);
|
||||
}
|
||||
|
||||
// 2nd file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue