aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGabriel Ganne <gabriel.ganne@enea.com>2017-12-19 16:13:44 +0100
committerDave Wallace <dwallacelf@gmail.com>2017-12-20 15:57:32 +0000
commit4c8a45491dc38a1075881be225df3be14801ffe9 (patch)
treeb77a69034616309a174a2c5e8b5eda0b74487088 /test
parent7b929793feba7d966c34b1ddb31dc818174f3a57 (diff)
fix kubeproxy some tests
* NAT46: fix test cleanup, missing del keyword * NAT66: fix kube-proxy vip, is ipv6 * add some missing kp_put_writer_lock * wipe flowtable after each unit test * Add new cli api: "test kube-proxy flowtable flush" to flushes everything * Call this new cli function after the end of each kube-proxy unit test. * same as commit b3d1b203579226ca5136b9d6a2744577d07cfcc6 for the lb plugin Change-Id: I4146f44841328ec96eb66729e3bae3d40f33e4aa Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Diffstat (limited to 'test')
-rw-r--r--test/test_kubeproxy.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test_kubeproxy.py b/test/test_kubeproxy.py
index 418e03adb52..2398802b362 100644
--- a/test/test_kubeproxy.py
+++ b/test/test_kubeproxy.py
@@ -146,6 +146,7 @@ class TestKP(VppTestCase):
for podid in self.pods:
self.vapi.cli("ku pod 90.0.0.0/8 10.0.0.%u del" % (podid))
self.vapi.cli("ku vip 90.0.0.0/8 nat4 del")
+ self.vapi.cli("test kube-proxy flowtable flush")
@unittest.skipUnless(running_extended_tests(), "part of extended tests")
def test_kp_ip6_nat4(self):
@@ -165,6 +166,7 @@ class TestKP(VppTestCase):
for podid in self.pods:
self.vapi.cli("ku pod 2001::/16 10.0.0.%u del" % (podid))
self.vapi.cli("ku vip 2001::/16 nat4 del")
+ self.vapi.cli("test kube-proxy flowtable flush")
@unittest.skipUnless(running_extended_tests(), "part of extended tests")
def test_kp_ip4_nat6(self):
@@ -181,14 +183,15 @@ class TestKP(VppTestCase):
self.checkCapture(nat4=False, isv4=True)
finally:
for podid in self.pods:
- self.vapi.cli("ku pod 90.0.0.0/8 2002::%u" % (podid))
+ self.vapi.cli("ku pod 90.0.0.0/8 2002::%u del" % (podid))
self.vapi.cli("ku vip 90.0.0.0/8 nat6 del")
+ self.vapi.cli("test kube-proxy flowtable flush")
@unittest.skipUnless(running_extended_tests(), "part of extended tests")
def test_kp_ip6_nat6(self):
""" Kube-proxy NAT66 """
try:
- self.vapi.cli("ku vip 90.0.0.0/8 port 3306 target_port 3307 nat6")
+ self.vapi.cli("ku vip 2001::/16 port 3306 target_port 3307 nat6")
for podid in self.pods:
self.vapi.cli("ku pod 2001::/16 2002::%u" % (podid))
@@ -201,3 +204,4 @@ class TestKP(VppTestCase):
for podid in self.pods:
self.vapi.cli("ku pod 2001::/16 2002::%u del" % (podid))
self.vapi.cli("ku vip 2001::/16 nat6 del")
+ self.vapi.cli("test kube-proxy flowtable flush")