mirror of
				https://github.com/laurivosandi/certidude
				synced 2025-10-30 17:09:19 +00:00 
			
		
		
		
	tests: Attempt to reset hostnames via pytest
This commit is contained in:
		| @@ -21,10 +21,6 @@ cache: | |||||||
|     - $HOME/.cache/pip |     - $HOME/.cache/pip | ||||||
| addons: | addons: | ||||||
|   hostname: ca |   hostname: ca | ||||||
|   hosts: |  | ||||||
|     - ca.example.lan ca |  | ||||||
|     - vpn.example.lan |  | ||||||
|     - ipsec.example.lan |  | ||||||
|   apt: |   apt: | ||||||
|     packages: |     packages: | ||||||
|     - python-configparser |     - python-configparser | ||||||
|   | |||||||
| @@ -36,6 +36,10 @@ def generate_csr(cn=None): | |||||||
| def test_cli_setup_authority(): | def test_cli_setup_authority(): | ||||||
|     import shutil |     import shutil | ||||||
|     import os |     import os | ||||||
|  |     with open("/etc/hosts", "w") as fh: | ||||||
|  |         fh.write("127.0.0.1 localhost\n") | ||||||
|  |         fh.write("127.0.0.1 ca.example.lan ca\n") | ||||||
|  |         fh.write("127.0.0.1 vpn.example.lan\n") | ||||||
|     if os.path.exists("/run/certidude/signer.pid"): |     if os.path.exists("/run/certidude/signer.pid"): | ||||||
|         with open("/run/certidude/signer.pid") as fh: |         with open("/run/certidude/signer.pid") as fh: | ||||||
|             try: |             try: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user