Skip to content

Commit

Permalink
Fix formatting with cargo fmt --check`
Browse files Browse the repository at this point in the history
Signed-off-by: Djordje Lukic <[email protected]>
  • Loading branch information
rumpl committed Feb 1, 2023
1 parent 0224b4f commit 1c2b27f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use oci_spec::runtime::{
Spec, SpecBuilder,
};
use std::collections::hash_set::HashSet;
use std::fs;
use std::os::unix::prelude::PermissionsExt;
use std::path::{Path, PathBuf};
use std::str::FromStr;
use std::fs;
use test_framework::{Test, TestGroup, TestResult};

fn get_spec(added_mounts: Vec<Mount>, process_args: Vec<String>) -> Spec {
Expand Down Expand Up @@ -249,7 +249,11 @@ pub fn get_mounts_recursive_test() -> TestGroup {
let rnoexec_test = Test::new("rnoexec_test", Box::new(check_recursive_noexec));

let mut tg = TestGroup::new("mounts_recursive");
tg.add(vec![Box::new(rro_test), Box::new(rnosuid_test), Box::new(rnoexec_test)]);
tg.add(vec![
Box::new(rro_test),
Box::new(rnosuid_test),
Box::new(rnoexec_test),
]);

tg
}
9 changes: 6 additions & 3 deletions tests/rust-integration-tests/runtimetest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ mod tests;
mod utils;

use oci_spec::runtime::Spec;
use std::path::PathBuf;
use std::env;
use std::path::PathBuf;

const SPEC_PATH: &str = "/config.json";

Expand All @@ -25,11 +25,14 @@ fn main() {
Some(execute_test) => execute_test.to_string(),
None => return eprintln!("error due to execute test name not found"),
};

match &*execute_test {
"readonly_paths" => tests::validate_readonly_paths(&spec),
"set_host_name" => tests::validate_hostname(&spec),
"mounts_recursive" => tests::validate_mounts_recursive(&spec),
_ => eprintln!("error due to unexpected execute test name: {}", execute_test),
_ => eprintln!(
"error due to unexpected execute test name: {}",
execute_test
),
}
}

0 comments on commit 1c2b27f

Please sign in to comment.