Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'certbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py')
-rwxr-xr-xcertbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/certbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py b/certbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py
new file mode 100755
index 000000000..68bd6287d
--- /dev/null
+++ b/certbot-apache/tests/apache-conf-files/apache-conf-test-pebble.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+"""
+This executable script wraps the apache-conf-test bash script, in order to setup a pebble instance
+before its execution. Directory URL is passed through the SERVER environment variable.
+"""
+import os
+import subprocess
+import sys
+
+from certbot_integration_tests.utils import acme_server
+
+SCRIPT_DIRNAME = os.path.dirname(__file__)
+
+
+def main(args=None):
+ if not args:
+ args = sys.argv[1:]
+ with acme_server.ACMEServer('pebble', [], False) as acme_xdist:
+ environ = os.environ.copy()
+ environ['SERVER'] = acme_xdist['directory_url']
+ command = [os.path.join(SCRIPT_DIRNAME, 'apache-conf-test')]
+ command.extend(args)
+ return subprocess.call(command, env=environ)
+
+
+if __name__ == '__main__':
+ sys.exit(main())