Experimental extension of the activitypub-testsuite for testing bovine.
This repository contains bovine-specific code and configuration. The test framework starts a Python subprocess at the beginning of a test session. The server main is in server.py
. This sets up an in-memory database and adds a test reset endpoint. Before each test, the test reset action is invoked to reset the bovine database.
Note
At the time this test suite was created, the bovine code was changing frequently. There's a good chance the test suite will not run with the current version of bovine (without some changes).
- MacOS or Linux
- Python 3.11+
- Node.js 16+
The project is currently configured to expect the activitypub-testsuite
repository in a sibling directory. In the future, this may be modified to include activitypub-testsuite
as a git submodule in the bovine-aptesting
testing repository.
-
Create a directory to hold the repositories,
testing
, for example, but the name doesn't matter. -
Clone the
activitypub-testsuite
into that directory and install it.
git clone https://github.com/steve-bate/activitypub-testsuite.git
cd activitypub-testsuite/
poetry install
cd -
- Clone the
bovine-aptesting
repository into thetesting
directory (a sibling of the previous repository). Note the special submodule-related argument to clone.
git clone --recurse-submodules https://github.com/steve-bate/bovine-aptesting
Note
The bovine submodule is currently a test-related branch of my bovine
fork. This branch contains several patches to fix issues and add some test-related endpoint (which are subject to change). This project will eventually be using the primary, authoritative repository.
At this point, the directory structure should look similar to the following one.
testing
├── activitypub-testsuite
├── bovine-aptesting
- Change to the
bovine-aptesting
directory and install it.
cd bovine-aptesting
poetry install
Run the tests from bovine-aptesting
directory. The tests will run in a Python virtual environment created by Poetry. You will need to run them using
poetry run pytest
or
poetry shell # creates a shell configured with the virtual environment
pytest