runk: skip the test_init_container_create_launcher if not root on ppc64le

This is to skip the test_init_container_create_launcher if not root on ppc64le.

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
This commit is contained in:
Amulyam24 2024-01-09 13:01:36 +05:30 committed by Hyounggyu Choi
parent a4b5447924
commit 4ecd82a5df

View File

@ -95,6 +95,7 @@ mod tests {
use std::fs::{create_dir, File}; use std::fs::{create_dir, File};
use std::path::Path; use std::path::Path;
use tempfile::tempdir; use tempfile::tempdir;
use test_utils::skip_if_not_root;
#[test] #[test]
fn test_init_container_validate() { fn test_init_container_validate() {
@ -113,6 +114,8 @@ mod tests {
#[test] #[test]
fn test_init_container_create_launcher() { fn test_init_container_create_launcher() {
#[cfg(target_arch = "powerpc64")]
skip_if_not_root!();
let logger = slog::Logger::root(slog::Discard, o!()); let logger = slog::Logger::root(slog::Discard, o!());
let root_dir = tempdir().unwrap(); let root_dir = tempdir().unwrap();
let bundle_dir = tempdir().unwrap(); let bundle_dir = tempdir().unwrap();