diff --git a/salt/modules/x509.py b/salt/modules/x509.py index fdaa41aba4..92e39a6b88 100644 --- a/salt/modules/x509.py +++ b/salt/modules/x509.py @@ -1391,10 +1391,13 @@ def create_certificate( for ignore in list(_STATE_INTERNAL_KEYWORDS) + \ ['listen_in', 'preqrequired', '__prerequired__']: kwargs.pop(ignore, None) + # TODO: Make timeout configurable in Neon certs = __salt__['publish.publish']( tgt=ca_server, fun='x509.sign_remote_certificate', - arg=salt.utils.data.decode_dict(kwargs, to_str=True)) + arg=salt.utils.data.decode_dict(kwargs, to_str=True), + timeout=30 + ) if not any(certs): raise salt.exceptions.SaltInvocationError( diff --git a/tests/integration/files/conf/master b/tests/integration/files/conf/master index 68e38f618c..4c23eb3361 100644 --- a/tests/integration/files/conf/master +++ b/tests/integration/files/conf/master @@ -28,7 +28,7 @@ tcp_master_workers: 64515 peer: '.*': - - 'test.*' + - '(x509|test).*' ext_pillar: - ext_pillar_opts: diff --git a/tests/integration/files/conf/master.d/peers.conf b/tests/integration/files/conf/master.d/peers.conf deleted file mode 100644 index b28b03ddc0..0000000000 --- a/tests/integration/files/conf/master.d/peers.conf +++ /dev/null @@ -1,3 +0,0 @@ -peer: - .*: - - x509.sign_remote_certificate diff --git a/tests/integration/states/test_x509.py b/tests/integration/states/test_x509.py index 99709aa434..1808d3c19e 100644 --- a/tests/integration/states/test_x509.py +++ b/tests/integration/states/test_x509.py @@ -60,6 +60,9 @@ class x509Test(ModuleCase, SaltReturnAssertsMixin): def tearDown(self): os.remove(os.path.join(TMP_PILLAR_TREE, 'signing_policies.sls')) os.remove(os.path.join(TMP_PILLAR_TREE, 'top.sls')) + certs_path = os.path.join(TMP, 'pki') + if os.path.exists(certs_path): + salt.utils.files.rm_rf(certs_path) self.run_function('saltutil.refresh_pillar') def run_function(self, *args, **kwargs):