Skip to content
Snippets Groups Projects
Commit 40fbb521 authored by I. Nüske's avatar I. Nüske
Browse files

DOC: Reorder README.md, add setup guide, fix typos

parent c851aece
Branches
Tags
2 merge requests!89Integration Test Suggestions - Inttest,!81F local inttests
Pipeline #60404 failed
......@@ -7,23 +7,38 @@ Linkahead project.
## Getting started #
### Configuration
### Setup
The following steps describe how to setup the tests for running agains
a plain LinkAhead server built from the sources. In case you want to
use LinkAhead Control instead, there is a pre-confidured [test
profile](/test_profile/profile.yml) in this repository that you can
use for this. Instructions can be found in the official LinkAhead
[documentation](https://docs.indiscale.com//caosdb-deploy/README_SETUP.html#integration-tests).
Dependencies can be installed using `pip install -r requirements.txt`.
- To run tests, start up a Linkahead server with the following properties (documentation for this can
be found elsewhere):
The tests must be run against a correctly configured linkahead server. The suggested
way to achieve this is to start linkahead using the [test_profile](/test_profile/profile.yml)
provided with this repository. Instructions can be found in the official LinkAhead
[documentation](https://docs.indiscale.com//caosdb-deploy/README_TEST.html#integration-tests).
After a linkahead server is set up, copy the content of
[`pylinkahead.ini.template`](pylinkahead.ini.template) to a new file named `pylinkahead.ini`.
### Run the tests
The tests can then be run from the base directory using `pytest` or `pytest-3` (depending on
your system). You can also select a single test file with `pytest-3 tests/test_issues.py`,
or a test matching a regular expression, f.e. using `pytest-3 tests/test_issues.py -k issue_123`.
## Configuration for LinkAhead servers built from source
The following steps describe how to set up the tests for running against
a plain LinkAhead server built from the sources.
- To run tests, start up a Linkahead server with the following properties
(documentation for this can be found in the [official documentation](https://docs.indiscale.com/)):
- The Linkahead server must have debugging enabled.
- The database should be empty.
- The `resources` directory should be made visible, e.g., by
symlinking or copying its contents, to the server in
symlinking or copying its contents to the server in
`scripting/bin-debug`.
- Modify `pylinkahead.ini.template` and save it as `pylinkahead.ini`, taking care of the following points:
- Modify `pylinkahead.ini.template` and save it as `pylinkahead.ini`,
taking care of the following points:
- Certificates must be valid and be specified in `pylinkahead.ini`.
- Server-side scripting paths must be given, otherwise server-side
scripting will be omitted. The remote path
......@@ -33,27 +48,14 @@ use for this. Instructions can be found in the official LinkAhead
- Paths for the file tests must exist, or be creatable by the
testing script and the server.
### Run the tests
- Run the tests with `pytest` or `pytest-3` (depending on your system).
- If you want to run just a single test, you can also select a single test file:
`pytest-3 tests/test_issues.py`
or a test matching a regular expression:
`pytest-3 tests/test_issues.py -k issue_123`
## Requirements ##
- Running the tests needs `pytest`, obviously, and also the `nose` library:
- `pip3 install pytest nose`
## Run tests agains a remote linkahead server
## Run tests against a remote linkahead server
* There is a special mark `local_server`, which marks all test which cannot
pass when the server is not on the host where the test suite is running.
* Start tests with `pytest -m "not local_server"` or
`tox -- -m "not local_server"`.
* The remote linkahead server must have a TLS certificate which maches the name given in
`pylinkahead.ini`. If you use LinkAhead Control, this can be achieved by:
* The remote linkahead server must have a TLS certificate which matches the name given
in `pylinkahead.ini`. If you use LinkAhead Control, this can be achieved by:
* `linkahead cert_gen -- --hostname <your hostname>`
* `linkahead certs -d <your profile path>/custom/other/cert`
* `linkahead start`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment