summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-09-12 13:42:57 +0100
committerGitHub <noreply@github.com>2024-09-12 13:42:57 +0100
commit9652bfda0a7f3e7932aecb32262c34f3fede72b2 (patch)
treee1b9eab8002bcdfd72103513b8d39c0ef63f8d6a /smoketest/scripts
parent27cecc66756307b9c1c0946b5610ce2098096ede (diff)
parent0fda7ea9516756455f631202517b2bc08c961e34 (diff)
downloadvyos-1x-9652bfda0a7f3e7932aecb32262c34f3fede72b2.tar.gz
vyos-1x-9652bfda0a7f3e7932aecb32262c34f3fede72b2.zip
Merge pull request #4053 from vyos/mergify/bp/circinus/pr-4032
T6701: Added ability to disable the container DNS plugin (backport #4032)
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_container.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_container.py b/smoketest/scripts/cli/test_container.py
index 5e33eba40..c03b9eb44 100755
--- a/smoketest/scripts/cli/test_container.py
+++ b/smoketest/scripts/cli/test_container.py
@@ -208,6 +208,22 @@ class TestContainer(VyOSUnitTestSHIM.TestCase):
self.assertEqual(c['NetworkSettings']['Networks'][net_name]['Gateway'] , str(ip_interface(prefix4).ip + 1))
self.assertEqual(c['NetworkSettings']['Networks'][net_name]['IPAddress'] , str(ip_interface(prefix4).ip + ii))
+ def test_no_name_server(self):
+ prefix = '192.0.2.0/24'
+ base_name = 'ipv4'
+ net_name = 'NET01'
+
+ self.cli_set(base_path + ['network', net_name, 'prefix', prefix])
+ self.cli_set(base_path + ['network', net_name, 'no-name-server'])
+
+ name = f'{base_name}-2'
+ self.cli_set(base_path + ['name', name, 'image', cont_image])
+ self.cli_set(base_path + ['name', name, 'network', net_name, 'address', str(ip_interface(prefix).ip + 2)])
+ self.cli_commit()
+
+ n = cmd_to_json(f'sudo podman network inspect {net_name}')
+ self.assertEqual(n['dns_enabled'], False)
+
def test_uid_gid(self):
cont_name = 'uid-test'
gid = '100'