Skip to content

Commit

Permalink
Use modern tox invocation syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Oct 17, 2023
1 parent 3bae0b7 commit e6d52b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ Code standards

pyLXD formats code with Black and isort. Verify the formatting with::

tox -e lint
tox run -e lint

If it fails, you can reformat the code with::

tox -e format
tox run -e format

Testing
-------

Testing pyLXD is in 3 parts:

1. Conformance with Black and isort, using the ``tox -e lint`` command.
2. Unit tests using ``tox -e py`` or ``tox -e coverage``.
3. Integration tests using the ``tox -e integration-in-lxd``.
1. Conformance with Black and isort, using the ``tox run -e lint`` command.
2. Unit tests using ``tox run -e py`` or ``tox run -e coverage``.
3. Integration tests using the ``tox run -e integration-in-lxd``.

.. note:: all of the tests can be run by just using the ``tox`` command on it's
own, with the exception of the integration tests. These are not
Expand All @@ -103,7 +103,7 @@ Integration Testing
^^^^^^^^^^^^^^^^^^^

Integration testing requires a running LXD system. They can be tested locally
in LXD container with nesting support; ``tox -e integration-in-lxd``.
in LXD container with nesting support; ``tox run -e integration-in-lxd``.

.. _Github: https://github.com/canonical/pylxd
.. _Tox: https://tox.wiki/en/latest/
Expand Down
2 changes: 1 addition & 1 deletion integration/run-integration-tests
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ OLD_TRUST_LIST="$(mktemp)"
save_trust_list > "${OLD_TRUST_LIST}"

# finally run the integration tests
tox -e integration
tox run -e integration

# Remove any cert added to the trusted list by the integration tests
NEW_TRUST_LIST="$(mktemp)"
Expand Down
2 changes: 1 addition & 1 deletion migration/run_migration_integration_tests-18-04
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ lxc exec "$CONTAINER_ONE_NAME" -- mkdir -p /opt/pylxd
# NOTE: rockstar (13 Sep 2016) - --recursive is not supported in lxd <2.1, so
# until we have pervasive support for that, we'll do this tar hack.
tar cf - ./* .git | lxc exec "$CONTAINER_ONE_NAME" -- tar xf - -C /opt/pylxd
lxc exec "$CONTAINER_ONE_NAME" -- /bin/sh -c "cd /opt/pylxd && tox -emigration"
lxc exec "$CONTAINER_ONE_NAME" -- /bin/sh -c "cd /opt/pylxd && tox run -e migration"

lxc delete --force "$CONTAINER_ONE_NAME"
lxc delete --force "$CONTAINER_TWO_NAME"
Expand Down

0 comments on commit e6d52b6

Please sign in to comment.