mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-10 05:18:30 +03:00
tests: Enable mtime test
I think this just accidentally was never enabled. While looking at the code, add a sleep here to be resilient to filesystems with only second mtime granularity.
This commit is contained in:
parent
0b519c2573
commit
8bba482bc8
@ -26,6 +26,7 @@ const TESTS: &[StaticTest] = &[
|
|||||||
test!(sysroot::itest_tmpfiles),
|
test!(sysroot::itest_tmpfiles),
|
||||||
test!(repobin::itest_basic),
|
test!(repobin::itest_basic),
|
||||||
test!(repobin::itest_nofifo),
|
test!(repobin::itest_nofifo),
|
||||||
|
test!(repobin::itest_mtime),
|
||||||
test!(repobin::itest_extensions),
|
test!(repobin::itest_extensions),
|
||||||
test!(repobin::itest_pull_basicauth),
|
test!(repobin::itest_pull_basicauth),
|
||||||
];
|
];
|
||||||
|
@ -42,6 +42,7 @@ pub(crate) fn itest_mtime() -> Result<()> {
|
|||||||
"
|
"
|
||||||
)?;
|
)?;
|
||||||
let ts = Path::new("repo").metadata()?.modified().unwrap();
|
let ts = Path::new("repo").metadata()?.modified().unwrap();
|
||||||
|
std::thread::sleep(std::time::Duration::from_secs(1));
|
||||||
bash!(r#"ostree --repo=repo commit -b test -s "bump mtime" --tree=dir=tmproot >/dev/null"#)?;
|
bash!(r#"ostree --repo=repo commit -b test -s "bump mtime" --tree=dir=tmproot >/dev/null"#)?;
|
||||||
assert_ne!(ts, Path::new("repo").metadata()?.modified().unwrap());
|
assert_ne!(ts, Path::new("repo").metadata()?.modified().unwrap());
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user