| 1334 | |
| 1335 | #[test] |
| 1336 | fn test_buildah_injected() -> Result<()> { |
| 1337 | let td = fixture()?; |
| 1338 | let config = &LintExecutionConfig::default(); |
| 1339 | td.create_dir("etc")?; |
| 1340 | assert!(check_buildah_injected(&td, config).unwrap().is_ok()); |
| 1341 | td.write("etc/hostname", b"")?; |
| 1342 | assert!(check_buildah_injected(&td, config).unwrap().is_err()); |
| 1343 | td.write("etc/hostname", b"some static hostname")?; |
| 1344 | assert!(check_buildah_injected(&td, config).unwrap().is_ok()); |
| 1345 | Ok(()) |
| 1346 | } |
| 1347 | |
| 1348 | #[test] |
| 1349 | fn test_list() { |