Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration test validation CI, make io_priority test conditional #2707

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading