diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-12-01 14:20:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-01 14:20:28 +0100 |
commit | 33c0d77bfa10c81dfc93c4eca781279df9cf1034 (patch) | |
tree | 274033b3413e383820c665de2b874c929a91524c /smoketest | |
parent | 97f36fe0c1f337d73e5f0af4e2fecefadc3325b4 (diff) | |
parent | 032de023c21d92262243a2abb34bfd4c2009958e (diff) | |
download | vyos-1x-33c0d77bfa10c81dfc93c4eca781279df9cf1034.tar.gz vyos-1x-33c0d77bfa10c81dfc93c4eca781279df9cf1034.zip |
Merge pull request #1684 from jestabro/config-script-dependency
pki: T4847: correct calling of config mode script dependencies from pki.py
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_pki.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_pki.py b/smoketest/scripts/cli/test_pki.py index cba5ffdde..b18b0b039 100755 --- a/smoketest/scripts/cli/test_pki.py +++ b/smoketest/scripts/cli/test_pki.py @@ -246,5 +246,27 @@ class TestPKI(VyOSUnitTestSHIM.TestCase): self.cli_delete(['service', 'https', 'certificates', 'certificate']) + def test_certificate_eapol_update(self): + self.cli_set(base_path + ['certificate', 'smoketest', 'certificate', valid_ca_cert.replace('\n','')]) + self.cli_set(base_path + ['certificate', 'smoketest', 'private', 'key', valid_ca_private_key.replace('\n','')]) + self.cli_commit() + + self.cli_set(['interfaces', 'ethernet', 'eth1', 'eapol', 'certificate', 'smoketest']) + self.cli_commit() + + cert_data = None + + with open('/run/wpa_supplicant/eth1_cert.pem') as f: + cert_data = f.read() + + self.cli_set(base_path + ['certificate', 'smoketest', 'certificate', valid_update_cert.replace('\n','')]) + self.cli_set(base_path + ['certificate', 'smoketest', 'private', 'key', valid_update_private_key.replace('\n','')]) + self.cli_commit() + + with open('/run/wpa_supplicant/eth1_cert.pem') as f: + self.assertNotEqual(cert_data, f.read()) + + self.cli_delete(['interfaces', 'ethernet', 'eth1', 'eapol']) + if __name__ == '__main__': unittest.main(verbosity=2) |