steve-bate / apex-aptesting

This repository contains activitypub-express test support code and configuration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

apex-aptesting

Experimental extension of the activitypub-testsuite for testing activitypub-express.

This repository contains activitypub-express test support code and configuration. The activitypub-express software is a library for building AP servers. For testing, the library is used to create a small AP server with some test control endpoints and additional diagnostic output. It also installs a custom in-memory IApexStore implementation instead of using the MongoDB store. The test server code is in the apex_aptesting/app subdirectory.

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 apex-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 apex-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/apex-aptesting

At this point, the directory structure should look similar to the following one.

testing
  ├── activitypub-testsuite
  ├── apex-aptesting
  1. Change to the apex-aptesting directory and install it. This will do the Python (Poetry) install and run npm init in the activitypub-express submodule (the code being tested).
cd apex-aptesting
sh install.sh

Usage

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

This repository contains activitypub-express test support code and configuration.

License:MIT License


Languages

Language:JavaScript 83.2%Language:Python 16.0%Language:Shell 0.8%