Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #8330

Closed
Open
Created Feb 24, 2013 by Isis Lovecruft@isis

ooni: NetTestCase.checkRequiredOptions() does not parse conditionals

if i do:

class FooTestCase(nettest.NetTestCase):
    checkRequiredOptions = ['dstip', 'port']

everything works just fine, because checkRequiredOptions() expects a list of things that are expected, and if anything is missing then it doesn't run FooTestCase.

However, what if I wanted to do:

class FooTestCase(nettest.NetTestCase):
    checkRequiredOptions =  ( 'dstip' & 'port' ) || 'file'

Obviously, doesn't work. But it should, because there are now several tests which essentially have their own smarter versions of checkRequiredOptions(), including dnsconsistency and echo.

In the newer (as of right now unmerged) feature/task-manager* branches, either NetTestCase.checkRequiredOptions() or NetTestLoader.checkOptions() should support conditional options (the latter has a call to the former).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking