Skip to content

Commit

Permalink
Remove empty read-only paths condition from read_only integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: chermehdi <mehdi.cheracher@gmail.com>
  • Loading branch information
chermehdi committed Dec 1, 2022
1 parent 371d87a commit c21a7d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ fn create_spec(hostname: &str) -> Spec {
SpecBuilder::default()
.hostname(hostname)
.linux(
// Need to reset the read-only paths
LinuxBuilder::default()
.readonly_paths(vec![
"/proc/bus".to_string(),
"/proc/fs".to_string(),
"/proc/sys".to_string(),
])
.readonly_paths(vec![])
.build()
.expect("error in building linux config"),
)
Expand Down
5 changes: 1 addition & 4 deletions tests/rust-integration-tests/runtimetest/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ pub fn validate_readonly_paths(spec: &Spec) {
return;
}
};
if ro_paths.is_empty() {
eprintln!("in readonly paths, expected some readonly paths to be set, found none");
return;
}

// TODO when https://github.com/rust-lang/rust/issues/86442 stabilizes,
// change manual matching of i32 to e.kind() and match statement

Expand Down

0 comments on commit c21a7d0

Please # to comment.