Skip to content
Snippets Groups Projects
Select Git revision
  • a2a96224baba5459886e9cc9617d44fd348a538d
  • main default protected
  • dev protected
  • f-string-ids
  • f-prefill
  • f-fix-accent-sensitivity
  • f-filesystem-import
  • f-update-acl
  • f-filesystem-link
  • f-filesystem-directory
  • f-filesystem-core
  • f-filesystem-cleanup
  • f-filesystem-main
  • f-multipart-encoding
  • f-trigger-advanced-user-tools
  • f-real-rename-test-pylibsolo2
  • f-real-rename-test-pylibsolo
  • f-real-rename-test
  • f-linkahead-rename
  • f-reference-record
  • f-xml-serialization
  • linkahead-pylib-v0.18.0
  • linkahead-control-v0.16.0
  • linkahead-pylib-v0.17.0
  • linkahead-mariadbbackend-v8.0.0
  • linkahead-server-v0.13.0
  • caosdb-pylib-v0.15.0
  • caosdb-pylib-v0.14.0
  • caosdb-pylib-v0.13.2
  • caosdb-server-v0.12.1
  • caosdb-pylib-v0.13.1
  • caosdb-pylib-v0.12.0
  • caosdb-server-v0.10.0
  • caosdb-pylib-v0.11.1
  • caosdb-pylib-v0.11.0
  • caosdb-server-v0.9.0
  • caosdb-pylib-v0.10.0
  • caosdb-server-v0.8.1
  • caosdb-pylib-v0.8.0
  • caosdb-server-v0.8.0
  • caosdb-pylib-v0.7.2
41 results

caosdb-pyinttest

  • Open with
  • Download source code
  • Your workspaces

      A workspace is a virtual sandbox environment for your code in GitLab.

      No agents available to create workspaces. Please consult Workspaces documentation for troubleshooting.

  • README

    Welcome

    This is the Linkahead Python Integration Testing repository and a part of the Linkahead project.

    Getting started

    Configuration

    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 in this repository that you can use for this. Instructions can be found in the official LinkAhead documentation.

    • To run tests, start up a Linkahead server with the following properties (documentation for this can be found elsewhere):
      • 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 scripting/bin-debug.
    • 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 local path test_server_side_scripting.bin_dir.local should point to a linkahead-server/scripting/bin somwhere.
        • The remote path test_server_side_scripting.bin_dir.server should probably be something like /opt/caosdb/git/caosdb-server/scripting/bin-debug.
      • 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

    • 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:
      • linkahead cert_gen -- --hostname <your hostname>
      • linkahead certs -d <your profile path>/custom/other/cert
      • linkahead start

    Further Reading

    Please refer to the official documentation for more information.

    Contributing

    Thank you very much to all contributers—past, present, and prospective ones.

    Code of Conduct

    By participating, you are expected to uphold our Code of Conduct.

    How to Contribute

    • You found a bug, have a question, or want to request a feature? Please create an issue.
    • You want to contribute code? Please fork the repository and create a merge request in GitLab and choose this repository as target. Make sure to select "Allow commits from members who can merge the target branch" under Contribution when creating the merge request. This allows our team to work with you on your request.
    • You can also contact us at info (AT) indiscale.com.

    License

    • Copyright (C) 2018 Research Group Biomedical Physics, Max Planck Institute for Dynamics and Self-Organization Göttingen.
    • Copyright (C) 2020-2024 Indiscale GmbH info@indiscale.com

    All files in this repository are licensed under the GNU Affero General Public License (version 3 or later).