Manual testing guide for awful-nntp development.
cd ~/dev/awful-nntp
cp .env.example .env
# Edit .env with your SA username/passwordcd ~/dev/awful-nntp
mix run --no-haltYou should see:
[info] NNTP server listening on port 1199
In a separate terminal:
telnet localhost 1199Expected response:
Trying 127.0.0.1...
Connected to localhost.
200 awful-nntp ready (posting ok)
CAPABILITIES
Expected response:
101 Capability list
VERSION 2
READER
LIST ACTIVE
AUTHINFO USER
.
First, authenticate:
AUTHINFO USER your_sa_username
Expected response:
381 Password required
AUTHINFO PASS your_sa_password
Expected response:
281 Authentication accepted
Now list forums:
LIST
Expected response:
215 Newsgroups follow
sa.general-bullshit 0 0 y
sa.games 0 0 y
sa.sports-argument 0 0 y
(... more forums ...)
.
Note: This fetches real SA forum data! It requires valid SA credentials.
GROUP sa.general-bullshit
Expected response:
211 0 0 0 sa.general-bullshit
Invalid newsgroup:
GROUP invalid
Expected response:
411 No such newsgroup
AUTHINFO USER your_sa_username
Expected response:
381 Password required
AUTHINFO PASS your_sa_password
Expected response (with valid credentials):
281 Authentication accepted
Expected response (with invalid credentials):
481 Authentication failed
QUIT
Expected response:
205 Closing connection
Connection closed by foreign host.
sudo pacman -S tintin -r localhost:1199What to expect:
- Connection banner
- Empty newsgroup list (no SA forums yet)
- Can test navigation and interface
sudo pacman -S slrnmkdir -p ~/.slrn
echo "server localhost 1199" > ~/.slrnrcslrnWhat Works:
- ✅ Server accepts connections
- ✅ Sends welcome banner
- ✅ Parses NNTP commands
- ✅ CAPABILITIES returns server capabilities
- ✅ AUTHINFO validates against real SA credentials
- ✅ LIST returns real SA forums (requires authentication)
- ✅ GROUP validates newsgroup names (stub data for now)
- ✅ QUIT closes connection cleanly
What's In Progress:
- ⏳ GROUP fetching thread lists (validates names but returns stub data)
- ⏳ ARTICLE retrieving posts (returns 430 - not implemented)
What Doesn't Work Yet:
- ❌ No thread listing in GROUP (returns 0 articles)
- ❌ No article retrieval (ARTICLE returns 430)
- ❌ No posting support (POST not implemented)
- ❌ No caching (every LIST hits SA)
Run the test suite:
mix testExpected output:
........................
Finished in 0.1 seconds
1 doctest, 23 tests, 0 failures
All 24 tests passing ✅
Run specific test file:
mix test test/awful_nntp/nntp/protocol_test.exs
mix test test/awful_nntp/sa/parser_test.exsFetch real SA HTML for testing/development:
cd ~/dev/awful-nntp
./scripts/fetch_sa_samples.exsThis creates:
samples/forums.html- Main forum listsamples/forum_26.html- Example forum (GBS)samples/thread.html- Example thread with posts
Note: Sample files are gitignored and not committed.
-
Start server:
mix run --no-halt
-
In another terminal, test with telnet:
telnet localhost 1199
-
Make code changes
-
Stop server (Ctrl+C twice)
-
Restart and retest
# Check what's using port 1199
ss -tlnp | grep 1199
# Kill the process
kill <PID>Check compilation errors:
mix compileEnsure server is running:
ps aux | grep "mix run"Check port is listening:
ss -tln | grep 1199After testing the current implementation, the next features to add are:
- GROUP Command - Fetch thread lists from SA forums
- ARTICLE Command - Fetch and format individual posts
- Caching Layer - Cache forums/threads/posts to reduce SA load
- Posting Support - Create threads and replies
- Error Handling - Better handling of SA errors and edge cases