tests: initial asf framework refactoring for 'make test'
Type: refactor Change-Id: I41455b759a5d302ad5c4247c13634c471e7d49a8 Signed-off-by: Pratikshya Prasai <pratikshyaprasai2112@gmail.com> Signed-off-by: Saima Yunus <yunus.saima.234@gmail.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
This commit is contained in:
parent
4dbd641136
commit
657bdf781a
1
test/asf/README
Normal file
1
test/asf/README
Normal file
@ -0,0 +1 @@
|
||||
A Scapy Free (ASF) Test Framework
|
1858
test/asf/asfframework.py
Normal file
1858
test/asf/asfframework.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ import inspect
|
||||
import os
|
||||
import reprlib
|
||||
import unittest
|
||||
from framework import VppTestCase
|
||||
from asfframework import VppTestCase
|
||||
from multiprocessing import Process, Pipe
|
||||
from pickle import dumps
|
||||
import sys
|
@ -2,7 +2,7 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import os
|
||||
import unittest
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
from vpp_papi import VppEnum
|
||||
import json
|
||||
|
@ -3,7 +3,7 @@
|
||||
import unittest
|
||||
|
||||
from config import config
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from framework import VppTestCase
|
||||
from asfframework import VppTestCase
|
||||
|
||||
|
||||
class TestBuffers(VppTestCase):
|
@ -7,7 +7,7 @@ import unittest
|
||||
|
||||
from vpp_papi import VPPIOError
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
|
||||
|
||||
class TestCLI(VppTestCase):
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from framework import VppTestCase
|
||||
from framework import tag_fixme_vpp_workers
|
||||
from asfframework import VppTestCase
|
||||
from asfframework import tag_fixme_vpp_workers
|
||||
|
||||
|
||||
@tag_fixme_vpp_workers
|
@ -2,7 +2,7 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
|
||||
|
||||
class TestCrypto(VppTestCase):
|
@ -12,13 +12,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import framework
|
||||
import asfframework
|
||||
import vpp_papi_provider
|
||||
|
||||
F64_ONE = 1.0
|
||||
|
||||
|
||||
class TestEndian(framework.VppTestCase):
|
||||
class TestEndian(asfframework.VppTestCase):
|
||||
"""TestEndian"""
|
||||
|
||||
def test_f64_endian_value(self):
|
@ -2,8 +2,8 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from framework import tag_fixme_vpp_workers
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import tag_fixme_vpp_workers
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
|
||||
|
||||
@tag_fixme_vpp_workers
|
@ -5,7 +5,7 @@ import unittest
|
||||
import os
|
||||
import subprocess
|
||||
import http.client
|
||||
from framework import VppTestCase, VppTestRunner, Worker
|
||||
from asfframework import VppTestCase, VppTestRunner, Worker
|
||||
from vpp_devices import VppTAPInterface
|
||||
|
||||
|
@ -7,7 +7,7 @@ import unittest
|
||||
import time
|
||||
import re
|
||||
|
||||
from framework import VppTestCase
|
||||
from asfframework import VppTestCase
|
||||
from vpp_object import VppObject
|
||||
from vpp_pg_interface import CaptureTimeoutError
|
||||
from vpp_ip_route import VppIpRoute, VppRoutePath
|
@ -2,7 +2,7 @@ import socket
|
||||
import unittest
|
||||
|
||||
from util import ppp
|
||||
from framework import VppTestRunner
|
||||
from asfframework import VppTestRunner
|
||||
from template_ipsec import IPSecIPv4Fwd
|
||||
|
||||
"""
|
@ -3,7 +3,7 @@ import socket
|
||||
import unittest
|
||||
|
||||
from util import ppp
|
||||
from framework import VppTestRunner
|
||||
from asfframework import VppTestRunner
|
||||
from template_ipsec import SpdFlowCacheTemplate
|
||||
|
||||
|
@ -2,7 +2,7 @@ import socket
|
||||
import unittest
|
||||
|
||||
from util import ppp
|
||||
from framework import VppTestRunner
|
||||
from asfframework import VppTestRunner
|
||||
from template_ipsec import SpdFlowCacheTemplate
|
||||
|
||||
|
@ -3,7 +3,7 @@ import unittest
|
||||
import ipaddress
|
||||
|
||||
from util import ppp
|
||||
from framework import VppTestRunner
|
||||
from asfframework import VppTestRunner
|
||||
from template_ipsec import IPSecIPv4Fwd
|
||||
from template_ipsec import IPSecIPv6Fwd
|
||||
|
@ -12,13 +12,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import framework
|
||||
import asfframework
|
||||
import ipaddress
|
||||
|
||||
DEFAULT_VIP = "lb_vip_details(_0=978, context=12, vip=vl_api_lb_ip_addr_t(pfx=IPv6Network(u'::/0'), protocol=<vl_api_ip_proto_t.IP_API_PROTO_RESERVED: 255>, port=0), encap=<vl_api_lb_encap_type_t.LB_API_ENCAP_TYPE_GRE4: 0>, dscp=<vl_api_ip_dscp_t.IP_API_DSCP_CS0: 0>, srv_type=<vl_api_lb_srv_type_t.LB_API_SRV_TYPE_CLUSTERIP: 0>, target_port=0, flow_table_length=0)" # noqa
|
||||
|
||||
|
||||
class TestLbEmptyApi(framework.VppTestCase):
|
||||
class TestLbEmptyApi(asfframework.VppTestCase):
|
||||
"""TestLbEmptyApi"""
|
||||
|
||||
def test_lb_empty_vip_dump(self):
|
||||
@ -37,7 +37,7 @@ class TestLbEmptyApi(framework.VppTestCase):
|
||||
self.assertEqual(rv, [], "Expected: [] Received: %r." % rv)
|
||||
|
||||
|
||||
class TestLbApi(framework.VppTestCase):
|
||||
class TestLbApi(asfframework.VppTestCase):
|
||||
"""TestLbApi"""
|
||||
|
||||
def test_lb_vip_dump(self):
|
||||
@ -58,7 +58,7 @@ class TestLbApi(framework.VppTestCase):
|
||||
self.vapi.cli("lb vip 2001::/16 del")
|
||||
|
||||
|
||||
class TestLbAsApi(framework.VppTestCase):
|
||||
class TestLbAsApi(asfframework.VppTestCase):
|
||||
"""TestLbAsApi"""
|
||||
|
||||
def test_lb_as_dump(self):
|
@ -3,7 +3,7 @@
|
||||
import unittest
|
||||
|
||||
from config import config
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
|
||||
import os
|
||||
|
@ -2,7 +2,7 @@
|
||||
import re
|
||||
import unittest
|
||||
import platform
|
||||
from framework import VppTestCase
|
||||
from asfframework import VppTestCase
|
||||
|
||||
|
||||
def checkX86():
|
@ -2,7 +2,7 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
from vpp_policer import VppPolicer, PolicerAction
|
||||
|
||||
# Default for the tests is 10s of "Green" packets at 8Mbps, ie. 10M bytes.
|
@ -2,9 +2,9 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from framework import tag_fixme_vpp_workers
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from framework import tag_run_solo
|
||||
from asfframework import tag_fixme_vpp_workers
|
||||
from asfframework import VppTestCase, VppTestRunner
|
||||
from asfframework import tag_run_solo
|
||||
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user