Command auth tests that depend on enabled-by-default feature flags are always skipped

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      In jstests/auth/lib/commands_lib.js we have a suite of command authorization tests. Since commands may depend on feature flags, their tests are skipped if it is disabled, using the following pattern (example):

      {
          testname: "myCommand",
          command: {myCommand: false},
          skipTest: _ => !TestData.setParameters.featureFlagFooBar,
          testcases: [{runOnDb: adminDbName, roles: roles_all, privileges: []}],
      }
      

       

      The problem with this pattern is that, once the feature flag is enabled by default, resmoke won't set it anymore through setParameters, so the tests are always skipped and the coverage is lost.

      The code should check if the feature flag is enabled in a way that is independent on how it got enabled.

       

      Please review the following tests for your team based on the above:

      Full List:

      https://docs.google.com/spreadsheets/d/1FqYXFEhitY1atJB7mM0mHShyWWCce5Wa5UQYB7X5jD8/edit?gid=0#gid=0

       

            Assignee:
            Unassigned
            Reporter:
            Sergi Mateo Bellido
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: