[metrics-bugs] #21171 [Metrics/Onionoo]: write a test for NodeDetailsStatusUpdater
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun Jun 11 15:57:38 UTC 2017
#21171: write a test for NodeDetailsStatusUpdater
-----------------------------+------------------------------
Reporter: iwakeh | Owner: metrics-team
Type: enhancement | Status: new
Priority: Medium | Milestone:
Component: Metrics/Onionoo | Version:
Severity: Normal | Resolution:
Keywords: metrics-help | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-----------------------------+------------------------------
Comment (by iwakeh):
Replying to [comment:3 kiki201]:
> Do I need to create mock objects for ReverseDomainNameResolver,
LookupService, Descriptor and other classes?
Only, if you need these to test the fix supplied in #20994.
>
> Do I need to use reflection to test private methods and do I even need
to test private methods?
Same here, if it provides a shortcut and turns out to be easier you can
use reflection, no must.
As the description of this ticket is quite terse, I try to give some more
details:
Ticket #20994#comment:5 explains the bug, its fix, and supplies the fixed
code, but no test.
So, the aim is to device a test that fails on code before
[https://gitweb.torproject.org/onionoo.git/commit/?id=f737faa109ab527a5bfa2ded72bffd1d3063f2fc
this commit] (and because of the reason described in #20994#comment:5).
There are no requirements of having to use mock objects or reflection, but
they are fine to use for making the test code simpler.
This might turn out tricky, just feel free to experiment.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21171#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the metrics-bugs
mailing list