Skip to content

Commit

Permalink
docs: Explain how to add new integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioabreu committed Jun 7, 2018
1 parent 43087c4 commit 49ff6da
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/contributing/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ Here is an example on how to test the creation of a new configuration:
cname=['www.example-cname.com'], delivery_protocol='http')
assert isinstance(configuration, Configuration)
To create new tests, you need to export an environment variable named `AZ_TOKEN`.
If you are using `Bash shell` you can export the variable and then run the tests:

.. code-block:: bash
AZ_TOKEN='mytoken'
make test
Using `Fish shell` like me? No problems:

.. code-block:: fish
set -x AZ_TOKEN 'mytoken'
make test
It is necessary because your new tests will try to hit the production API to fetch the response.
After executing the test, a new `cassette` will be generated. Your patch must contain these files.

Cassettes
~~~~~~~~~

Expand Down

0 comments on commit 49ff6da

Please sign in to comment.