From db0a4f903976c3e0a4f4d0c5fa7f7a543be0e90e Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Tue, 28 Mar 2017 16:15:09 -0700 Subject: [PATCH 1/3] Document tests/integration/_common.sh. This makes it much easier to run certbot during development. --- docs/contributing.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/contributing.rst b/docs/contributing.rst index 5cdf86147..cc24ad898 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -39,17 +39,17 @@ Then in each shell where you're working on the client, do: .. code-block:: shell source ./venv/bin/activate + . tests/integration/_common.sh After that, your shell will be using the virtual environment, and you run the -client by typing: +client by typing `certbot` or `certbot_test`. The latter is an alias that +includes several flags useful for testing. For instance, it sets various output +directories to point to /tmp/, and uses non-privileged ports for challenges, so +root privileges are not required. -.. code-block:: shell - - certbot - -Activating a shell in this way makes it easier to run unit tests -with ``tox`` and integration tests, as described below. To reverse this, you -can type ``deactivate``. More information can be found in the `virtualenv docs`_. +Activating a shell with `venv/bin/activate` sets environment variables so that +Python pulls in the correct versions of various packages needed by Certbot. +More information can be found in the `virtualenv docs`_. .. _`virtualenv docs`: https://virtualenv.pypa.io From e73c29374a59d11caaab8d7e7db875964769715a Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Wed, 29 Mar 2017 14:32:02 -0700 Subject: [PATCH 2/3] Change to source. --- docs/contributing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing.rst b/docs/contributing.rst index cc24ad898..d6b77facf 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -39,7 +39,7 @@ Then in each shell where you're working on the client, do: .. code-block:: shell source ./venv/bin/activate - . tests/integration/_common.sh + source tests/integration/_common.sh After that, your shell will be using the virtual environment, and you run the client by typing `certbot` or `certbot_test`. The latter is an alias that From a08e9599f5f70b059285b48d984b898a69a25092 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Fri, 7 Apr 2017 10:15:52 -0700 Subject: [PATCH 3/3] Review feedback. --- docs/contributing.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/contributing.rst b/docs/contributing.rst index d6b77facf..23cd59aa7 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -39,6 +39,7 @@ Then in each shell where you're working on the client, do: .. code-block:: shell source ./venv/bin/activate + export SERVER=https://acme-staging.api.letsencrypt.org/directory source tests/integration/_common.sh After that, your shell will be using the virtual environment, and you run the @@ -116,6 +117,14 @@ and working. Fetch and start Boulder using: If you have problems with Docker, you may want to try `removing all containers and volumes`_ and making sure you have at least 1GB of memory. +Set up a certbot_test alias that enables easily running against the local +Boulder: + +.. code-block:: shell + + export SERVER=http://localhost:4000/directory + source tests/integration/_common.sh + Run the integration tests using: .. code-block:: shell