mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
Use archiveArtifact() for Ping+IPerf
This commit is contained in:
@@ -9,11 +9,13 @@ import os
|
||||
os.system(f'rm -rf cmake_targets')
|
||||
os.system(f'mkdir -p cmake_targets/log')
|
||||
import unittest
|
||||
import tempfile
|
||||
|
||||
sys.path.append('./') # to find OAI imports below
|
||||
import cls_oai_html
|
||||
from cls_ci_helper import TestCaseCtx
|
||||
import cls_oaicitest
|
||||
import cls_containerize
|
||||
import cls_cmd
|
||||
|
||||
class TestPingIperf(unittest.TestCase):
|
||||
def setUp(self):
|
||||
@@ -22,7 +24,10 @@ class TestPingIperf(unittest.TestCase):
|
||||
self.ci = cls_oaicitest.OaiCiTest()
|
||||
self.ci.ue_ids = ["test"]
|
||||
self.ci.nodes = ["localhost"]
|
||||
self.cont = cls_containerize.Containerize()
|
||||
self.ctx = TestCaseCtx.Default(tempfile.mkdtemp())
|
||||
def tearDown(self):
|
||||
with cls_cmd.LocalCmd() as c:
|
||||
c.run(f'rm -rf {self.ctx.logPath}')
|
||||
|
||||
def test_ping(self):
|
||||
self.ci.ping_args = "-c3"
|
||||
@@ -30,7 +35,7 @@ class TestPingIperf(unittest.TestCase):
|
||||
self.ci.svr_id = "test"
|
||||
infra_file = "tests/config/infra_ping_iperf.yaml"
|
||||
# TODO Should need nothing but options and UE(s) to use
|
||||
success = self.ci.Ping(self.html, self.cont, infra_file=infra_file)
|
||||
success = self.ci.Ping(self.ctx, self.html, infra_file=infra_file)
|
||||
self.assertTrue(success)
|
||||
|
||||
def test_iperf(self):
|
||||
@@ -45,7 +50,7 @@ class TestPingIperf(unittest.TestCase):
|
||||
self.ci.iperf_profile = "balanced"
|
||||
infra_file = "tests/config/infra_ping_iperf.yaml"
|
||||
# TODO Should need nothing but options and UE(s) to use
|
||||
success = self.ci.Iperf(self.html, self.cont, infra_file=infra_file)
|
||||
success = self.ci.Iperf(self.ctx, self.html, infra_file=infra_file)
|
||||
self.assertTrue(success)
|
||||
|
||||
def test_iperf2_unidir(self):
|
||||
@@ -57,7 +62,7 @@ class TestPingIperf(unittest.TestCase):
|
||||
self.ci.iperf_profile = "balanced"
|
||||
infra_file = "tests/config/infra_ping_iperf.yaml"
|
||||
# TODO Should need nothing but options and UE(s) to use
|
||||
success = self.ci.Iperf2_Unidir(self.html, self.cont, infra_file=infra_file)
|
||||
success = self.ci.Iperf2_Unidir(self.ctx, self.html, infra_file=infra_file)
|
||||
self.assertTrue(success)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user