Skip to content

Commit 762f410

Browse files
yedayakscop
authored andcommitted
test(ifdown,iftest): Skip if we don't have network
Without network we likely don't have any interfaces configured either Fixes: #479
1 parent 28c3247 commit 762f410

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/t/test_ifdown.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
import os
2+
13
import pytest
24

35
from conftest import in_container
46

57

68
class TestIfdown:
9+
@pytest.mark.xfail(
10+
os.environ.get("NETWORK") == "none",
11+
reason="There won't be any configured interfaces without network",
12+
)
713
@pytest.mark.xfail(in_container(), reason="Probably fails in a container")
814
@pytest.mark.complete("ifdown ")
915
def test_1(self, completion):

test/t/test_ifup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
import os
2+
13
import pytest
24

35
from conftest import in_container
46

57

68
class TestIfup:
9+
@pytest.mark.xfail(
10+
os.environ.get("NETWORK") == "none",
11+
reason="There won't be any configured interfaces without network",
12+
)
713
@pytest.mark.xfail(in_container(), reason="Probably fails in a container")
814
@pytest.mark.complete("ifup ")
915
def test_1(self, completion):

0 commit comments

Comments
 (0)