Closed cjslep closed 4 years ago
base_actor
is now covered
52bc5fb9a5028cbd421bdf490506efc296227b0f
Remaining:
side_effect_actor.go
federating_wrapped_callbacks.go
social_wrapped_callbacks.go
transport.go
util.go
As of b4b18b96faa0946b9d6685202d42d530562739d1
This roughly puts unit test completeness at 25%.
Storytime:
AddNewIds
test would be straightforward.IsExtendedBy
checks everywhere for a Type T
.T
but fails for T
itself. As designed. D'oh!IsOrExtends
methods that is closed on T
(passes for child types of T
and T
itself)This is why I unit test. Still many more to go.
I broke a bunch of tests at some point when building out apcore
.
Requires re-running the mockgen
tool and fixing the expectations.
Been on a sprint to get as much unit testing done as possible. The only place left that needs unit tests is the C2S code (social_wrapped_callbacks.go
). Due to lack of popularity, I'm not going to tackle those at this time.
The command go test -coverprofile=t.out
reports coverage: 71.0% of statements
.
The command go test -v | grep -c PASS
over-counts the number of tests since they're grouped into subtests, so while it reports 233, the true number is probably in the 200-ish range.
The command go tool cover -html=t.out
reports per-file coverage as (ordered highest to lowest):
file | % coverage |
---|---|
version.go | 100.0% |
transport.go | 89.8% |
federating_wrapped_callbacks.go | 82.6% |
handlers.go | 80.6% |
side_effect_actor.go | 78.1% |
base_actor.go | 75.0% |
util.go | 72.9% |
social_wrapped_callbacks.go | 25.8% |
Marking closed.
Add or port unit tests for the v1 pub package.