mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-22 04:25:55 -04:00
Compare commits
3 Commits
4996da61e5
...
b97a995dc4
Author | SHA1 | Date | |
---|---|---|---|
|
b97a995dc4 | ||
|
5cd25e2ce2 | ||
|
aa1f2a5bc8 |
56
docs/testing.md
Normal file
56
docs/testing.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Running toot tests
|
||||||
|
|
||||||
|
## Mastodon
|
||||||
|
|
||||||
|
Clone mastodon repo and check out the tag you want to test:
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/mastodon/mastodon
|
||||||
|
cd mastodon
|
||||||
|
git checkout v4.2.8
|
||||||
|
```
|
||||||
|
|
||||||
|
Set up the required Ruby version using [ASDF](https://asdf-vm.com/). The
|
||||||
|
required version is listed in `.ruby-version`.
|
||||||
|
|
||||||
|
```
|
||||||
|
asdf install ruby 3.2.3
|
||||||
|
asdf local ruby 3.2.3
|
||||||
|
```
|
||||||
|
|
||||||
|
Install and set up database:
|
||||||
|
|
||||||
|
```
|
||||||
|
bundle install
|
||||||
|
yarn install
|
||||||
|
rails db:setup
|
||||||
|
```
|
||||||
|
|
||||||
|
Patch code so users are auto-approved:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl https://paste.sr.ht/blob/7c6e08bbacf3da05366b3496b3f24dd03d60bd6d | git am
|
||||||
|
```
|
||||||
|
|
||||||
|
Open registrations:
|
||||||
|
|
||||||
|
```
|
||||||
|
bin/tootctl settings registration open
|
||||||
|
```
|
||||||
|
|
||||||
|
Install foreman to run the thing:
|
||||||
|
|
||||||
|
```
|
||||||
|
gem install foreman
|
||||||
|
```
|
||||||
|
|
||||||
|
Start the server:
|
||||||
|
|
||||||
|
```
|
||||||
|
foreman start
|
||||||
|
```
|
||||||
|
|
||||||
|
## Pleroma
|
||||||
|
|
||||||
|
https://docs-develop.pleroma.social/backend/development/setting_up_pleroma_dev/
|
||||||
|
|
@ -81,6 +81,5 @@ packages=[
|
|||||||
[tool.setuptools_scm]
|
[tool.setuptools_scm]
|
||||||
|
|
||||||
[tool.pyright]
|
[tool.pyright]
|
||||||
include = ["toot"]
|
|
||||||
typeCheckingMode = "strict"
|
typeCheckingMode = "strict"
|
||||||
pythonVersion = "3.8"
|
pythonVersion = "3.8"
|
@ -155,3 +155,8 @@ def posted_status_id(out):
|
|||||||
_, _, status_id = match.groups()
|
_, _, status_id = match.groups()
|
||||||
|
|
||||||
return status_id
|
return status_id
|
||||||
|
|
||||||
|
|
||||||
|
def assert_ok(result: Result):
|
||||||
|
if result.exit_code != 0:
|
||||||
|
raise AssertionError(f"Command failed with exit code {result.exit_code}\nStderr: {result.stderr}")
|
||||||
|
Loading…
Reference in New Issue
Block a user