Skip to content

Commit 7084001

Browse files
committed
update tests to bypass userns restrictons and run in CI
Signed-off-by: Zen <[email protected]>
1 parent f6baeaf commit 7084001

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/unit_tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22+
- name: Permit unprivileged user namespaces
23+
run: |
24+
set -x
25+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
26+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
27+
2228
- name: Set up Python ${{ matrix.python-version }}
2329
uses: actions/setup-python@v3
2430
with:

tests/test_namespace.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from os import environ
21
from platform import system
32
from sys import version_info
43
from unittest import TestCase, main, skipIf
@@ -8,10 +7,6 @@
87

98
def check_test_compat():
109
"""Checks if tests are compatible with the current environment"""
11-
12-
if environ.get("CI", "false").lower() == "true":
13-
return
14-
1510
if system() != "Linux":
1611
return
1712

0 commit comments

Comments
 (0)