diff options
author | John Estabrook <jestabro@vyos.io> | 2023-11-21 23:29:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-21 23:29:38 -0600 |
commit | af08c30063fb1c68cbf1ca6cae3588efdef34b7d (patch) | |
tree | f567319c5761857d145af9685ee4343402172d61 /smoketest | |
parent | 02a3e26e88f0ac3c7368e288769bfed38b41df46 (diff) | |
parent | 0e885f1bf01424130b6876e769cc42612b19351b (diff) | |
download | vyos-1x-af08c30063fb1c68cbf1ca6cae3588efdef34b7d.tar.gz vyos-1x-af08c30063fb1c68cbf1ca6cae3588efdef34b7d.zip |
Merge pull request #2519 from c-po/t5762-vhost-port
http: T5762: rename "virtual-host listen-port" -> "virtual-host port"
Diffstat (limited to 'smoketest')
-rw-r--r-- | smoketest/config-tests/basic-api-service | 8 | ||||
-rw-r--r-- | smoketest/configs/basic-api-service | 24 | ||||
-rwxr-xr-x | smoketest/scripts/cli/test_service_https.py | 5 |
3 files changed, 32 insertions, 5 deletions
diff --git a/smoketest/config-tests/basic-api-service b/smoketest/config-tests/basic-api-service index d78062402..1d2dc3472 100644 --- a/smoketest/config-tests/basic-api-service +++ b/smoketest/config-tests/basic-api-service @@ -5,6 +5,14 @@ set service ntp server time1.vyos.net set service ntp server time2.vyos.net set service ntp server time3.vyos.net set service https api keys id 1 key 'S3cur3' +set service https virtual-host bar allow-client address '172.16.0.0/12' +set service https virtual-host bar port '5555' +set service https virtual-host foo allow-client address '10.0.0.0/8' +set service https virtual-host foo allow-client address '2001:db8::/32' +set service https virtual-host foo port '7777' +set service https virtual-host baz allow-client address '192.168.0.0/16' +set service https virtual-host baz port '6666' +set service https virtual-host baz server-name 'baz' set system config-management commit-revisions '100' set system host-name 'vyos' set system login user vyos authentication encrypted-password '$6$2Ta6TWHd/U$NmrX0x9kexCimeOcYK1MfhMpITF9ELxHcaBU/znBq.X2ukQOj61fVI2UYP/xBzP4QtiTcdkgs7WOQMHWsRymO/' diff --git a/smoketest/configs/basic-api-service b/smoketest/configs/basic-api-service index 98b2ebcf8..f5b56ac98 100644 --- a/smoketest/configs/basic-api-service +++ b/smoketest/configs/basic-api-service @@ -18,8 +18,28 @@ service { } socket } - } - ssh { + virtual-host bar { + allow-client { + address 172.16.0.0/12 + } + listen-port 5555 + server-name bar + } + virtual-host baz { + allow-client { + address 192.168.0.0/16 + } + listen-port 6666 + server-name baz + } + virtual-host foo { + allow-client { + address 10.0.0.0/8 + address 2001:db8::/32 + } + listen-port 7777 + server-name foo + } } } system { diff --git a/smoketest/scripts/cli/test_service_https.py b/smoketest/scripts/cli/test_service_https.py index 4da85fadf..901a1857e 100755 --- a/smoketest/scripts/cli/test_service_https.py +++ b/smoketest/scripts/cli/test_service_https.py @@ -81,7 +81,7 @@ class TestHTTPSService(VyOSUnitTestSHIM.TestCase): test_path = base_path + ['virtual-host', vhost_id] self.cli_set(test_path + ['listen-address', address]) - self.cli_set(test_path + ['listen-port', port]) + self.cli_set(test_path + ['port', port]) self.cli_set(test_path + ['server-name', name]) self.cli_commit() @@ -102,7 +102,7 @@ class TestHTTPSService(VyOSUnitTestSHIM.TestCase): def test_api_auth(self): vhost_id = 'example' address = '127.0.0.1' - port = '443' + port = '443' # default value name = 'localhost' key = 'MySuperSecretVyOS' @@ -110,7 +110,6 @@ class TestHTTPSService(VyOSUnitTestSHIM.TestCase): test_path = base_path + ['virtual-host', vhost_id] self.cli_set(test_path + ['listen-address', address]) - self.cli_set(test_path + ['listen-port', port]) self.cli_set(test_path + ['server-name', name]) self.cli_commit() |