Opened 7 months ago

Closed 6 months ago

#32300 closed defect (fixed)

Improve snowflake server test coverage

Reported by: cohosh Owned by: cohosh
Priority: Medium Milestone:
Component: Circumvention/Snowflake Version:
Severity: Normal Keywords:
Cc: arlolra, cohosh, phw, dcf Actual Points: .5
Parent ID: #29259 Points:
Reviewer: Sponsor:

Description

Splitting #29259 into smaller tickets.

As of writing this, the snowflake server unit test coverage is 3%.

Child Tickets

Change History (6)

comment:1 Changed 7 months ago by cohosh

Here's a start on a branch with more server tests: https://github.com/cohosh/snowflake/compare/server_tests

I did the following minor refactor in the server:

  • allowed the passing in of a handler function in initServer

Test coverage is currently at 27.3% which is a big improvement. I don't think we need close to 100% here, a lot of things are currently in the main function and some code can't be tested with unit tests (calls to goptlib functions). The server is pretty small and easy to maintain as it is so I don't want to mess around with it too much.

comment:2 Changed 7 months ago by arma

Summary: Improve snowflake server test coverateImprove snowflake server test coverage

comment:3 Changed 6 months ago by cohosh

Status: assignedneeds_review

Okay I updated the tests and rebased them on the current master branch: https://github.com/cohosh/snowflake/pull/15

Turns out we don't need to refactor the server code anymore.

The current code coverage is 25.1% which I think is fine.

comment:4 Changed 6 months ago by cohosh

Actual Points: .5

comment:5 Changed 6 months ago by phw

Status: needs_reviewmerge_ready

Looks good to me!

comment:6 Changed 6 months ago by cohosh

Resolution: fixed
Status: merge_readyclosed
Note: See TracTickets for help on using tickets.