diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-03-18 06:48:14 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-18 06:48:14 +0000 |
| commit | e58b538fa3d37a9843507d4cd670560a03e336f1 (patch) | |
| tree | b253adea051ecc3fbdfbfd127bb5f59db842abe9 /smoketest/scripts/cli | |
| parent | 5b6dd9263ba063a1c867c7dc0952910e209b2d30 (diff) | |
| parent | 3d02ba26b07a40c18e1d2b90f30985544086d8d4 (diff) | |
| download | vyos-1x-e58b538fa3d37a9843507d4cd670560a03e336f1.tar.gz vyos-1x-e58b538fa3d37a9843507d4cd670560a03e336f1.zip | |
Merge pull request #5058 from alexk37/fix-isisd-fabricd-md5
T8389: fix domain-password md5 for isisd/fabricd
Diffstat (limited to 'smoketest/scripts/cli')
| -rwxr-xr-x | smoketest/scripts/cli/test_protocols_isis.py | 24 | ||||
| -rw-r--r-- | smoketest/scripts/cli/test_protocols_openfabric.py | 18 |
2 files changed, 42 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_protocols_isis.py b/smoketest/scripts/cli/test_protocols_isis.py index 5d61f4ce0..c0d505616 100755 --- a/smoketest/scripts/cli/test_protocols_isis.py +++ b/smoketest/scripts/cli/test_protocols_isis.py @@ -167,6 +167,7 @@ class TestProtocolsISIS(VyOSUnitTestSHIM.TestCase): def test_isis_05_password(self): password = 'foo' + md5_password = 'secret_md5_hash' self.cli_set(base_path + ['net', net]) for interface in self._interfaces: @@ -200,6 +201,29 @@ class TestProtocolsISIS(VyOSUnitTestSHIM.TestCase): tmp = self.getFRRconfig(f'interface {interface}', stop_section='^exit') self.assertIn(f' isis password clear {password}-{interface}', tmp) + # Switch to MD5 passwords - delete plaintext passwords first + self.cli_delete(base_path + ['area-password', 'plaintext-password']) + self.cli_delete(base_path + ['domain-password', 'plaintext-password']) + for interface in self._interfaces: + self.cli_delete(base_path + ['interface', interface, 'password', 'plaintext-password']) + + self.cli_set(base_path + ['domain-password', 'md5', md5_password]) + self.cli_set(base_path + ['area-password', 'md5', md5_password]) + for interface in self._interfaces: + self.cli_set(base_path + ['interface', interface, 'password', 'md5', md5_password]) + + # Commit all changes + self.cli_commit() + + # Verify all changes + tmp = self.getFRRconfig(f'router isis {domain}', stop_section='exit') + self.assertIn(f' domain-password md5 {md5_password}', tmp) + self.assertIn(f' area-password md5 {md5_password}', tmp) + + for interface in self._interfaces: + tmp = self.getFRRconfig(f'interface {interface}', stop_section='^exit') + self.assertIn(f' isis password md5 {md5_password}', tmp) + def test_isis_06_spf_delay_bfd(self): network = 'point-to-point' holddown = '10' diff --git a/smoketest/scripts/cli/test_protocols_openfabric.py b/smoketest/scripts/cli/test_protocols_openfabric.py index f5dcc53cd..c1e6f6598 100644 --- a/smoketest/scripts/cli/test_protocols_openfabric.py +++ b/smoketest/scripts/cli/test_protocols_openfabric.py @@ -117,6 +117,7 @@ class TestProtocolsOpenFabric(VyOSUnitTestSHIM.TestCase): def test_openfabric_03_password(self): password = 'foo' + md5_password = 'secret_md5_hash' self.openfabric_base_config() @@ -147,6 +148,23 @@ class TestProtocolsOpenFabric(VyOSUnitTestSHIM.TestCase): tmp = self.getFRRconfig(f'interface {dummy_if}', stop_section='^exit') self.assertIn(f' openfabric password clear {password}-{dummy_if}', tmp) + # Switch to MD5 passwords - delete plaintext passwords first + self.cli_delete(path + ['domain-password', 'plaintext-password']) + self.cli_delete(path + ['interface', dummy_if, 'password', 'plaintext-password']) + + self.cli_set(path + ['domain-password', 'md5', md5_password]) + self.cli_set(path + ['interface', dummy_if, 'password', 'md5', md5_password]) + + # Commit all changes + self.cli_commit() + + # Verify all changes + tmp = self.getFRRconfig(f'router openfabric {domain}', stop_section='^exit') + self.assertIn(f' domain-password md5 {md5_password}', tmp) + + tmp = self.getFRRconfig(f'interface {dummy_if}', stop_section='^exit') + self.assertIn(f' openfabric password md5 {md5_password}', tmp) + def test_openfabric_multiple_domains(self): domain_2 = 'VyOS_2' interface = 'dum5678' |
