Skip to content

Experimental extension of the activitypub-testsuite for testing onepage.pub.

License

Notifications You must be signed in to change notification settings

steve-bate/onepage-aptesting

Repository files navigation

onepage-aptesting

Experimental extension of the activitypub-testsuite for testing onepage.pub.

This repository contains onepage.pub-specific code and configuration. The test framework starts a Node.js subprocess at the beginning of a test session. Before each test, a custom test reset API is called to reset the onepage.pub database.

Install

Requirements

  • 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 onepage-aptesting testing repository.

Set Up

  1. Create a directory to hold the repositories, testing, for example, but the name doesn't matter.

  2. 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 -
  1. Clone the onepage-aptesting repository into the testing directory (a sibling of the previous repository). Note the special submodule-related argument to clone.
git clone --recurse-submodules https://github.com/steve-bate/onepage-aptesting

Note

The onepage.pub submodule is currently a test-related branch of my onepage.pub 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
  ├── onepage-aptesting
  1. Change to the onepage-aptesting directory and install it. This will do the Python (Poetry) install and run npm init in the onepage.pub submodule (the code being tested).
cd onepage-aptesting
sh install.sh

Usage

Run the tests from onepage-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

License

MIT License

About

Experimental extension of the activitypub-testsuite for testing onepage.pub.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published