Skip to content

Commit

Permalink
Fix integration test validation CI, make io_priority test conditional (
Browse files Browse the repository at this point in the history
…#2707)

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
  • Loading branch information
YJDoc2 committed Feb 27, 2024
1 parent 7e36f6e commit cfa2ea9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/integration_tests_validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ jobs:
with:
files: |
.github/workflows/integration_tests_validation.yaml
tests/runtimetest/**
tests/test_framework/**
tests/integration_test/**
tests/contest/**
files_ignore: |
**.md
- name: List all changed files
Expand Down
21 changes: 14 additions & 7 deletions tests/contest/contest/src/tests/io_priority/io_priority_test.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::utils::test_inside_container;
use crate::utils::{is_runtime_runc, test_inside_container};
use anyhow::{Context, Result};
use oci_spec::runtime::{
IOPriorityClass, LinuxIOPriorityBuilder, ProcessBuilder, Spec, SpecBuilder,
};
use test_framework::{test_result, Test, TestGroup, TestResult};
use test_framework::{test_result, ConditionalTest, TestGroup, TestResult};

fn create_spec(
io_priority_class: IOPriorityClass,
Expand Down Expand Up @@ -60,12 +60,19 @@ fn io_priority_class_idle_test() -> TestResult {

pub fn get_io_priority_test() -> TestGroup {
let mut io_priority_group = TestGroup::new("set_io_priority");
let io_priority_class_rt =
Test::new("io_priority_class_rt", Box::new(io_priority_class_rt_test));
let io_priority_class_be =
Test::new("io_priority_class_be", Box::new(io_priority_class_be_test));
let io_priority_class_idle = Test::new(
let io_priority_class_rt = ConditionalTest::new(
"io_priority_class_rt",
Box::new(|| !is_runtime_runc()),
Box::new(io_priority_class_rt_test),
);
let io_priority_class_be = ConditionalTest::new(
"io_priority_class_be",
Box::new(|| !is_runtime_runc()),
Box::new(io_priority_class_be_test),
);
let io_priority_class_idle = ConditionalTest::new(
"io_priority_class_idle",
Box::new(|| !is_runtime_runc()),
Box::new(io_priority_class_idle_test),
);

Expand Down

0 comments on commit cfa2ea9

Please sign in to comment.