From b5c9dd63967c926083e36d1e074ac7c6a22578bb Mon Sep 17 00:00:00 2001 From: sever-sever Date: Sat, 17 Apr 2021 15:59:51 +0000 Subject: smoketest: T2216: Containeres set ip to test01 --- smoketest/scripts/cli/test_container.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/smoketest/scripts/cli/test_container.py b/smoketest/scripts/cli/test_container.py index d4f152828..09ca89721 100755 --- a/smoketest/scripts/cli/test_container.py +++ b/smoketest/scripts/cli/test_container.py @@ -27,7 +27,7 @@ from vyos.util import read_file base_path = ['container'] cont_image = 'busybox' -prefix = '192.0.2.0/24' +prefix = '192.168.205.0/24' net_name = 'NET01' PROCESS_NAME = 'podman' @@ -39,23 +39,15 @@ def cmd_to_json(command): class TesContainer(VyOSUnitTestSHIM.TestCase): - # We need real internet connection to pull images - def setUp(self): + + def test_01_basic_container(self): + cont_name = 'c1' + self.cli_set(['interfaces', 'ethernet', 'eth0', 'address', '10.0.2.15/24']) self.cli_set(['protocols', 'static', 'route', '0.0.0.0/0', 'next-hop', '10.0.2.2']) self.cli_set(['system', 'name-server', '1.1.1.1']) self.cli_set(['system', 'name-server', '8.8.8.8']) - def tearDown(self): - self.cli_delete(['interfaces', 'ethernet', 'eth0', 'address', '10.0.2.15/24']) - self.cli_delete(['protocols', 'static', 'route', '0.0.0.0/0', 'next-hop', '10.0.2.2']) - self.cli_delete(['system', 'name-server', '1.1.1.1']) - self.cli_delete(['system', 'name-server', '8.8.8.8']) - self.cli_delete(base_path) - self.cli_commit() - - def test_01_basic_container(self): - cont_name = 'c1' self.cli_set(base_path + ['name', cont_name, 'image', cont_image]) self.cli_set(base_path + ['name', cont_name, 'allow-host-networks']) @@ -67,7 +59,7 @@ class TesContainer(VyOSUnitTestSHIM.TestCase): def test_02_container_network(self): cont_name = 'c2' - cont_ip = '192.0.2.25' + cont_ip = '192.168.205.25' self.cli_set(base_path + ['network', net_name, 'ipv4-prefix', prefix]) self.cli_set(base_path + ['name', cont_name, 'image', cont_image]) self.cli_set(base_path + ['name', cont_name, 'network', net_name, 'address', cont_ip]) -- cgit v1.2.3