Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ services:
# Testing

activitypub-testing:
networks:
- test_network
build: .
volumes:
- ./src:/opt/activitypub/src
Expand Down Expand Up @@ -138,6 +140,8 @@ services:
start_period: 5s

migrate-testing:
networks:
- test_network
build: migrate
volumes:
- ./migrate/migrations:/migrations
Expand All @@ -148,6 +152,8 @@ services:
condition: service_healthy

cucumber-tests:
networks:
- test_network
build: .
volumes:
- ./features:/opt/activitypub/features
Expand All @@ -170,6 +176,8 @@ services:
condition: service_healthy

mysql-testing:
networks:
- test_network
image: mysql:8.0.31
environment:
- MYSQL_ROOT_PASSWORD=root
Expand All @@ -184,6 +192,8 @@ services:
retries: 120

pubsub-testing:
networks:
- test_network
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:499.0.0-emulators
ports:
- "8086:8085"
Expand All @@ -205,17 +215,33 @@ services:
start_period: 5s

fake-ghost-activitypub:
networks:
test_network:
aliases:
- fake-ghost-activitypub.test
image: wiremock/wiremock:3.10.0-1
entrypoint: [ "/docker-entrypoint.sh", "--global-response-templating", "--disable-gzip", "--verbose", "--port=80", "--https-port=443" ]
volumes:
- ./wiremock/fake-ghost/mappings:/home/wiremock/mappings

fake-external-activitypub:
networks:
test_network:
aliases:
- fake-external-activitypub.test
image: wiremock/wiremock:3.10.0-1
entrypoint: [ "/docker-entrypoint.sh", "--global-response-templating", "--disable-gzip", "--verbose", "--port=80", "--https-port=443" ]

fake-mastodon:
networks:
test_network:
aliases:
- fake-mastodon.test
image: wiremock/wiremock:3.10.0-1
ports:
- "8084:8080"
entrypoint: [ "/docker-entrypoint.sh", "--global-response-templating", "--disable-gzip", "--verbose" ]

networks:
test_network:
driver: bridge
4 changes: 2 additions & 2 deletions features/account.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ Feature: Account API
And the response contains "Our" account details

Scenario: Get account by handle
When an authenticated "get" request is made to "/.ghost/activitypub/account/@Alice@fake-external-activitypub"
When an authenticated "get" request is made to "/.ghost/activitypub/account/@Alice@fake-external-activitypub.test"
Then the request is accepted with a 200
And the response contains "Alice" account details

Scenario: Get non-existent account
When an authenticated "get" request is made to "/.ghost/activitypub/account/@nonexistent@fake-external-activitypub"
When an authenticated "get" request is made to "/.ghost/activitypub/account/@nonexistent@fake-external-activitypub.test"
Then the request is rejected with a 500

Scenario: Get account without authentication
Expand Down
Loading