Opened 4 years ago

Last modified 22 months ago

#17684 new enhancement

Simplify directory_get_from_dirserver so it can be unit tested

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

Description

In #4483, I refactor directory_get_from_dirserver so it can be unit tested.

But there's a series of stubborn nested conditionals in the middle of the function, that also change the values they're checking.

If we simplified this knot of conditions, then it would be much easier to unit test.

Child Tickets

Change History (18)

comment:1 Changed 4 years ago by teor

My refactor of directory_get_from_dirserver is now in bug17684 on https://github.com/teor2345/tor.git

(I decided not to over-complicate #4483 by trying to do this unrelated work there.)

comment:2 in reply to:  1 Changed 4 years ago by teor

Replying to teor:

My refactor of directory_get_from_dirserver is now in bug17684 on https://github.com/teor2345/tor.git

(I decided not to over-complicate #4483 by trying to do this unrelated work there.)

Ugh, but it's somewhat entangled with some of the commits from an older version of #4483. Looks like I'll sort this out after #4483 merges.

comment:3 Changed 4 years ago by nickm

Status: newneeds_revision

comment:4 Changed 4 years ago by nickm

Owner: set to teor
Status: needs_revisionassigned

Setting teor as the owner of this needs_revision ticket.

comment:5 Changed 4 years ago by nickm

Status: assignedneeds_revision

comment:6 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:7 Changed 4 years ago by isabela

Sponsor: SponsorS-can

comment:8 Changed 3 years ago by nickm

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

comment:9 Changed 3 years ago by isabela

Points: small1

comment:10 Changed 3 years ago by nickm

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

comment:11 Changed 3 years ago by nickm

Milestone: Tor: 0.2.???

move some milestone-free tickets into 0.2.???

comment:12 Changed 3 years ago by nickm

Parent ID: #17289

Unparenting.

comment:13 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:14 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:15 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:16 Changed 2 years ago by nickm

Keywords: refactor technical-debt added

comment:17 Changed 22 months ago by teor

Owner: teor deleted
Status: needs_revisionassigned

Disowning tickets I don't intend to work on in the next 6 months.

comment:18 Changed 22 months ago by teor

Status: assignednew

Mark all tickets that are assigned to nobody as "new".

Note: See TracTickets for help on using tickets.