Opened 4 years ago

Last modified 3 years ago

#17740 new enhancement

Unit Tests for Recent Consensuses

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: easy, tests, tor-tests-coverage, tor-tests-unit
Cc: Actual Points:
Parent ID: Points: 1
Reviewer: Sponsor: SponsorS-can

Description

It would be great to have unit tests for the functions that return a recent consensus:

Mock:

  • networkstatus_get_latest_consensus_by_flavor

Test:

  • networkstatus_get_latest_consensus
  • networkstatus_get_reasonably_live_consensus
  • networkstatus_consensus_is_boostrapping

Child Tickets

Change History (11)

comment:1 Changed 4 years ago by nickm

Points: small

comment:2 Changed 4 years ago by hkannan

Owner: set to hkannan
Status: newaccepted

comment:3 Changed 4 years ago by nickm

These resources might be helpful as you're writing unit tests:

doc/HACKING/WritingTests.txt in the Tor repository
The tinytest manual at https://github.com/nmathewson/tinytest/blob/master/tinytest-manual.md

comment:4 Changed 4 years ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.9.x-final

These seem like features, or like other stuff unlikely to be possible this month. Bumping them to 0.2.9

comment:5 Changed 4 years ago by isabela

Sponsor: SponsorS-can

comment:6 Changed 4 years ago by nickm

Keywords: tor-tests-coverage tor-tests-unit added

comment:7 Changed 3 years ago by isabela

Points: small1

comment:8 Changed 3 years ago by nickm

Milestone: Tor: 0.2.9.x-final
Parent ID: #17289

comment:9 Changed 3 years ago by nickm

Milestone: Tor: unspecified
Owner: hkannan deleted
Status: acceptedassigned

comment:10 Changed 3 years ago by nickm

Status: assignednew

comment:11 Changed 3 years ago by nickm

Parent ID: #17289

Unparenting.

Note: See TracTickets for help on using tickets.