From edbd692f5a29c02fbc0c64c737bc7d54157e0bc9 Mon Sep 17 00:00:00 2001 From: sever-sever Date: Fri, 16 Apr 2021 17:30:14 +0000 Subject: containers: T2216: Static ip for conteiner smoketest --- smoketest/scripts/cli/test_container.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'smoketest/scripts/cli/test_container.py') diff --git a/smoketest/scripts/cli/test_container.py b/smoketest/scripts/cli/test_container.py index f16dbd219..d4f152828 100755 --- a/smoketest/scripts/cli/test_container.py +++ b/smoketest/scripts/cli/test_container.py @@ -39,11 +39,18 @@ def cmd_to_json(command): class TesContainer(VyOSUnitTestSHIM.TestCase): + # We need real internet connection to pull images def setUp(self): - self.cli_set(['interfaces', 'ethernet', 'eth0', 'address', 'dhcp']) + 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', 'dhcp']) + 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() -- cgit v1.2.3