aboutsummaryrefslogtreecommitdiffstats
path: root/main/bash-completion/05-fix-arp-test.patch
blob: 3b01bbcc7d92591451385d9cefe44118123bd565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 90ede989622143dc93c9a05a18bc23767c4bff9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Tue, 30 Apr 2019 09:59:19 +0200
Subject: [PATCH] test_arp: Skip if ARP tables are empty

Skip test_arp if 'arp' yields no output.  This e.g. happens when
the host is not networking-enabled.
---
 test/t/test_arp.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/test/t/test_arp.py b/test/t/test_arp.py
index 35963d754e..0dc117284e 100644
--- a/test/t/test_arp.py
+++ b/test/t/test_arp.py
@@ -1,11 +1,8 @@
 import pytest
 
-from conftest import in_docker
-
 
 class TestArp:
-    @pytest.mark.xfail(in_docker(), reason="Probably fails in docker")
-    @pytest.mark.complete("arp ")
+    @pytest.mark.complete("arp ", skipif='test -z "$(arp 2>/dev/null)"')
     def test_1(self, completion):
         assert completion