Repository navigation
Development
go-while edited this page Oct 23, 2026
·
2 revisions
The repository is https://github.com/go-while/nntp-testkit. It has no
dependencies outside the standard library, so there is no go.sum.
| Path | What |
|---|---|
| testkit.go | the hang guard (Deadline) |
| client/ | the strict client |
| fakeserver/ | the fake server: server.go (options, script mode, faults), conn.go, store.go, generated.go (generated groups), storehandler.go, peer.go, tls.go
|
| proc/ | the process runner |
| conformance/ | stub |
| example_test.go | runnable examples; the first is copied in the README |
Each package's doc.go holds its contract. Change it together with the
code, and the tables in the README too.
gofmt -l . && go vet ./... && go test -race -count=1 ./...CI runs go vet, go test -race and gofmt on every push and pull
request (Linux and macOS, Go oldstable and stable).
When a project needs a server behaviour the kit can't produce yet (a real server's quirk, a new fault):
- Add it as an option:
StoreOptionsfor how the Store server answers,Faultsfor something that applies to any command's reply,Optionsfor the connection level. The zero value must keep the old behaviour. - Test it in the package, real-server behaviours in realworld_test.go.
- Describe it in
doc.goand the README, and here in the wiki (Store and Groups, Faults, Real World Server Behaviours). - Tag a release (below), then bump the version in the project that needs it and use the behaviour in its tests.
Before the tag, a project can test against a pushed branch with
go get github.com/go-while/nntp-testkit@<commit> (a replace to a local
checkout only works on the machine that has it).
- Merge the work into
mainand push. - Tag
mainwith an annotated tagvX.Y.Zand a one-line summary, and push the tag. - Add the version to Releases and Versioning and update the pages it changes.
nntp-testkit is free software under the GNU General Public License, version 2 — see LICENSE.