File: testing.md

package info (click to toggle)
toot 0.51.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,108 kB
  • sloc: python: 9,284; makefile: 41
file content (92 lines) | stat: -rw-r--r-- 1,897 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Running toot tests

toot has a series of integration tests to make sure it works with different Mastodon-compatible servers. This makes it a bit harder to run tests because we need a local instance to run the tests agains.

**Please, never run tests against a live instance!**

## 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
```

The server should now be live at: http://localhost:3000/

You can view any emails sent by Mastodon at: http://localhost:3000/letter_opener/

## Pleroma

https://docs-develop.pleroma.social/backend/development/setting_up_pleroma_dev/

## Sharkey

Testing toot on [Sharkey](https://activitypub.software/TransFem-org/Sharkey/)

Requires:
* postgresql
* redis
* node + pnpm

```sh
git clone https://activitypub.software/TransFem-org/Sharkey.git
cd Sharkey
git submodule update --init

cp .config/example.yml .config/default.yml
vim .config/default.yml
    # Edit these keys:
    # * db - put in your database credentials
    # * setupPassword - set any password, we'll use "toot"

createdb sharkey
pnpm install --frozen-lockfile
pnpm build
pnpm migrate
pnpm dev
```

Now sharkey should be started. Visit localhost:3000 and create an admin account using `setupPassword` defined in the config file.