-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added e2e tests for API endpoints #62
base: main
Are you sure you want to change the base?
Conversation
no refs Added e2e test for `GET /profile/:handle`
mysql-testing: | ||
image: mysql:lts | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=root | ||
- MYSQL_USER=ghost | ||
- MYSQL_PASSWORD=password | ||
- MYSQL_DATABASE=activitypub | ||
ports: | ||
- "3308:3306" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useful for debugging test db
@@ -81,6 +81,7 @@ services: | |||
- NODE_ENV=testing | |||
- SKIP_SIGNATURE_VERIFICATION=true | |||
- ALLOW_PRIVATE_ADDRESS=true | |||
- NODE_TLS_REJECT_UNAUTHORIZED=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@allouis I needed to add this otherwise the webfinger lookup on the fake-external-activitypub
would not work.
When Fedify does the lookup based on just being provided a handle (@[email protected]
) it defaults to using https
so i had to expose the --https-port
on the wiremock containers. This uses a self signed certificate, so had to enable NODE_TLS_REJECT_UNAUTHORIZED
so that node didn't complain about the certificate.
Not sure if i've not set something up correct somewhere thats meaning i need to do this?
no refs Added e2e test for `GET /actions/search/?query=<string>`
0fd3e2e
to
d7af22d
Compare
@@ -103,7 +103,7 @@ await configure({ | |||
filters: {}, | |||
loggers: [ | |||
{ category: 'activitypub', sinks: ['console'], level: 'info' }, | |||
{ category: 'fedify', sinks: ['console'], level: 'warning' } | |||
{ category: 'fedify', sinks: ['console'], level: process.env.NODE_ENV === 'testing' ? 'debug' : 'warning' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug was useful to figure out why my test wasn't working 😅
no refs
Added e2e tests for API endpoints