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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176 |
+ cd betula
+ make test
rm -f betula
go build -o betula ./cmd/betula
go: downloading github.com/mattn/go-sqlite3 v1.14.22
go: downloading golang.org/x/crypto v0.20.0
go: downloading humungus.tedunangst.com/r/webs v0.7.10
go: downloading golang.org/x/net v0.21.0
go: downloading git.sr.ht/~bouncepaw/mycomarkup/v5 v5.6.0
go: downloading golang.org/x/text v0.14.0
go test ./db
ok git.sr.ht/~bouncepaw/betula/db 0.071s
go test ./types
ok git.sr.ht/~bouncepaw/betula/types 0.001s
go test ./feeds
ok git.sr.ht/~bouncepaw/betula/feeds 0.008s
go test ./readpage
ok git.sr.ht/~bouncepaw/betula/readpage 0.204s
go test ./fediverse/activities
ok git.sr.ht/~bouncepaw/betula/fediverse/activities 0.002s
sh test-web.sh
rm: can't remove 'testing.betula': No such file or directory
killall: betula: no process killed
2024/06/08 20:00:07 Generating a new pair of RSA keys
2024/06/08 20:00:08 Running HTTP server at 0.0.0.0:1738
This is an experimental automated system for testing the WWW interface of Betula.
The instance is located at http://localhost:1738. Cross your fingers.
rm: can't remove '/home/build/.cache/betula/testing-cookie': No such file or directory
OK [First screen]
2024/06/08 20:00:08 /register
2024/06/08 20:00:08 Setting new credentials
OK [Register on first screen]
2024/06/08 20:00:09 /1: bookmark no. 1 not found
2024/06/08 20:00:09 404 Not found: /1
OK [Access non-existent post]
OK [Create a post]
2024/06/08 20:00:09 Received job no. 1 ‘Send Create{Note}’
2024/06/08 20:00:09 Nobody to broadcast to :-(
2024/06/08 20:00:09 Get bookmark page no. 1
OK [Access the freshly-created post]
OK [Log out]
2024/06/08 20:00:09 Unauthorized attempt to access /settings. 401.
2024/06/08 20:00:09 401 Unauthorized: /settings
OK [Logged out settings]
2024/06/08 20:00:09 Credentials match.
OK [Log in]
OK [Save link: both empty]
OK [Save link: given url empty title]
2024/06/08 20:00:09 Received job no. 2 ‘Send Create{Note}’
2024/06/08 20:00:09 Nobody to broadcast to :-(
2024/06/08 20:00:09 Received job no. 3 ‘Send Create{Note}’
2024/06/08 20:00:09 Nobody to broadcast to :-(
OK [Save link: given url to title]
OK [Save link: both given]
2024/06/08 20:00:09 Received job no. 4 ‘Send Create{Note}’
2024/06/08 20:00:09 Nobody to broadcast to :-(
OK [Save link: non-URL title and no URL]
OK [Save link: non-URL text to URL]
OK [Save link: page with no title, but giving a title]
2024/06/08 20:00:09 Received job no. 5 ‘Send Create{Note}’
2024/06/08 20:00:09 Nobody to broadcast to :-(
OK [Save link: page with no title, not giving a title]
2024/06/08 20:00:09 Received job no. 6 ‘Send Create{Note}’
OK [Save link: headless title]
2024/06/08 20:00:09 Nobody to broadcast to :-(
2024/06/08 20:00:09 Received job no. 7 ‘Send Create{Note}’
2024/06/08 20:00:09 Nobody to broadcast to :-(
2024/06/08 20:00:09 Received job no. 8 ‘Send Create{Note}’
2024/06/08 20:00:09 Nobody to broadcast to :-(
2024/06/08 20:00:09 Received job no. 9 ‘Send Create{Note}’
2024/06/08 20:00:09 Nobody to broadcast to :-(
2024/06/08 20:00:09 Received job no. 10 ‘Send Create{Note}’
2024/06/08 20:00:09 Nobody to broadcast to :-(
OK [Empty search]
OK [Existing tag search]
OK [Non-existent tag search]
2024/06/08 20:00:09 Searching ‘Merlin’. Authorized: true
OK [Search for some text]
2024/06/08 20:00:09 Searching ‘#me -#garden’. Authorized: true
OK [Tag search]
2024/06/08 20:00:09 Searching ‘микориза’. Authorized: true
OK [Search case-insensitive non-ASCII]
OK [Repost: Empty URL]
OK [Repost: Bad URL]
2024/06/08 20:00:09 Fetching remote bookmark from https://mycorrhiza.wiki
2024/06/08 20:00:10 Tried to fetch a remote bookmark from https://mycorrhiza.wiki, failed with: invalid character '<' looking for beginning of value. Falling back to microformats
OK [Repost: Non-repostable URL]
2024/06/08 20:00:10 Fetching remote bookmark from https://links.bouncepaw.com/1
2024/06/08 20:00:10 tags [{"gestlings" "" '\x00'} {"music" "" '\x00'} {"programming" "" '\x00'}]
map["@context":["https://www.w3.org/ns/activitystreams" map["Hashtag":"https://www.w3.org/ns/activitystreams#Hashtag"]] "actor":"https://links.bouncepaw.com/@bouncepaw" "attachment":[map["href":"https://pbat.ch/gestlings/" "type":"Link"]] "attributedTo":"https://links.bouncepaw.com/@bouncepaw" "content":"<h3><a href=\"https://pbat.ch/gestlings/\"'>Gestlings</a></h3><article class=\"mycomarkup-doc\"><p>Cool system, though I do not understand it fully. I especially like the Gestku the author posts on the Fediverse.\n</p></article><p><a href=\"https://links.bouncepaw.com/tag/gestlings\" class=\"mention hashtag\" rel=\"tag\">#<span>gestlings</span></a>, <a href=\"https://links.bouncepaw.com/tag/music\" class=\"mention hashtag\" rel=\"tag\">#<span>music</span></a>, <a href=\"https://links.bouncepaw.com/tag/programming\" class=\"mention hashtag\" rel=\"tag\">#<span>programming</span></a></p>" "id":"https://links.bouncepaw.com/1" "name":"Gestlings" "published":"2023-01-18T13:09:16Z" "source":map["content":"Cool system, though I do not understand it fully. I especially like the Gestku the author posts on the Fediverse." "mediaType":"text/mycomarkup"] "tag":[map["href":"https://links.bouncepaw.com/tag/gestlings" "name":"#gestlings" "type":"Hashtag"] map["href":"https://links.bouncepaw.com/tag/music" "name":"#music" "type":"Hashtag"] map["href":"https://links.bouncepaw.com/tag/programming" "name":"#programming" "type":"Hashtag"]] "to":["https://www.w3.org/ns/activitystreams#Public" "https://links.bouncepaw.com/followers"] "type":"Note"]
2024/06/08 20:00:10 Fetched a remote bookmark from https://links.bouncepaw.com/1
2024/06/08 20:00:10 Received job no. 11 ‘notify about my repost’
2024/06/08 20:00:10 404 Not found: /11
2024/06/08 20:00:10 Sending activity {"@context":"https://www.w3.org/ns/activitystreams","actor":{"id":"http://localhost:1738/@betula","preferredUsername":"bo"},"id":"http://localhost:1738/11","object":"https://links.bouncepaw.com/1","type":"Announce"} to https://links.bouncepaw.com/inbox
Test [Repost: Successful repost] failed miserably. It is a shame. Please do better.
Below is the output of cURL.
HTTP/1.1 303 See Other
Location: /11
Date: Sat, 08 Jun 2024 20:00:10 GMT
Content-Length: 0
HTTP/1.1 404 Not Found
Date: Sat, 08 Jun 2024 20:00:10 GMT
Content-Length: 1396
Content-Type: text/html; charset=utf-8
<!doctype html>
<html lang="en">
<head>
<title>Not Found</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<link rel="stylesheet" href="/static/style.css">
</head>
<body class="authorized">
<header class="horizontal-scroll-on-phone">
<nav>
<h1>Betula</h1>
<ul>
<li><a href="/">Bookmarks</a></li>
<li><a href="/tag">Tags</a></li>
<li><a href="/timeline">Timeline</a></li>
<li><a href="/random">Random</a></li>
<li><a href="/@bo">Your profile</a></li>
<li><a href="/help">Help</a></li>
</ul>
</nav>
</header>
<nav class="misc horizontal-scroll-on-phone">
<form class="search-form" action="/search" method="get">
<input id="search" type="text" aria-label="Search query" placeholder="Search query" name="q" value="">
</form>
<ul>
<li><a href="/save-link">Save link</a></li>
<li><a href="/repost">Repost</a></li>
</ul>
</nav>
<main>
<article>
<h2>Not Found</h2>
<p>The page you requested for is not there.</p>
<ul>
<li>
<p>It may have not been there to begin with.</p>
</li>
<li>
<p>Maybe, they lied to you by giving the wrong URL.</p>
</li>
<li>
<p>Maybe, the page was deleted or moved.</p>
</li>
</ul>
<p>Anyway, feel free to surf around here.</p>
</article>
</main>
</body>
<script src="/static/focus.js" defer></script>
</html>
make: *** [Makefile:22: test] Error 2
2024/06/08 20:00:10 Nobody to broadcast to :-(
|