Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CaosDB Python Integration Tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Python Integration Tests
Commits
40fbb521
Commit
40fbb521
authored
3 months ago
by
I. Nüske
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Reorder README.md, add setup guide, fix typos
parent
c851aece
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!89
Integration Test Suggestions - Inttest
,
!81
F local inttests
Pipeline
#60404
failed
3 months ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+29
-27
29 additions, 27 deletions
README.md
with
29 additions
and
27 deletions
README.md
+
29
−
27
View file @
40fbb521
...
...
@@ -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 ma
t
ches 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`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment