Skip to content

Commit

Permalink
docs: update prerequisites for running e2e tests (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshilgajera-crest authored Apr 16, 2024
1 parent a73a94c commit 6a16609
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ Run e2e tests locally
* For e2e tests we are using a functionality of pytest which creates a temp dir and copies all the required file to that dir and then runs the pytest cmd from the tests.
* e2e tests can be found under /tests/e2e

Note: Must install docker desktop.
Prerequisites:

* Docker version: 25.0.3
* Docker Compose version: v2.24.6-desktop.1

.. code:: bash
Expand All @@ -156,6 +159,27 @@ Note: Must install docker desktop.
$ poetry install
$ poetry run pytest -v --splunk-version=${splunk-version} -m docker -m ${test-marker} tests/e2e
Troubleshooting:

1. If you face an error like this:

argparse.ArgumentError: argument -K/--keepalive: conflicting option strings: -K, --keepalive

* This is likely to happen if you have older version of PSA requirements installed, to solve this try to uninstall lovely-pytest-docker and pull the latest main branch and then do `poetry install`

2. If while running the tests you face an exception like this:

`Exception: Command ['docker', 'compose', '-f', '<path>/docker-compose.yml', '-p', '<projectname>', 'down', '-v'] returned 125: """unknown shorthand flag: 'f' in -f`

* This happens due to misconfigurations in docker, try to follow below steps:
* sudo mkdir -p /usr/local/lib/docker
* sudo ln -s /Applications/Docker.app/Contents/Resources/cli-plugins /usr/local/lib/docker/cli-plugins

3. If you face error like this:

ERROR: no match for platform in manifest: not found

* Try adding platform: `linux/amd64` to docker-compose.yml file

Contributing
------------
Expand Down

0 comments on commit 6a16609

Please sign in to comment.