MCPcopy Create free account
hub / github.com/bootc-dev/bootc / test_composefs

Function test_composefs

crates/lib/src/lints.rs:1313–1333  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1311
1312 #[test]
1313 fn test_composefs() -> Result<()> {
1314 let td = fixture()?;
1315 let config = &LintExecutionConfig::default();
1316
1317 // An empty root should fail our test
1318 assert!(check_composefs(&td, config).unwrap().is_err());
1319
1320 drop(td);
1321 let td = passing_fixture()?;
1322 // This should pass as the fixture includes a valid composefs config.
1323 check_composefs(&td, config).unwrap().unwrap();
1324
1325 td.write(
1326 "usr/lib/ostree/prepare-root.conf",
1327 b"[composefs]\nenabled = false",
1328 )?;
1329 // Now it should fail because composefs is explicitly disabled.
1330 assert!(check_composefs(&td, config).unwrap().is_err());
1331
1332 Ok(())
1333 }
1334
1335 #[test]
1336 fn test_buildah_injected() -> Result<()> {

Callers

nothing calls this directly

Calls 3

passing_fixtureFunction · 0.85
check_composefsFunction · 0.85
fixtureFunction · 0.70

Tested by

no test coverage detected