Update some tests not to use getLastError unless they target legacy functionality

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Query Execution 2021-05-31, Query Execution 2021-06-14
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We have many old tests that check success of a command-based operation by calling getLastError. We should update the test to use assert.commandWorked instead.

      This ticket deals with:

      jstests/auth/resource_pattern_matching.js
      jstests/core/dropdb_race.js
      jstests/multiVersion/genericSetFCVUsage/3_upgrade_replset.js
      jstests/multiVersion/migration_between_mixed_version_mongods.js
      jstests/multiVersion/minor_version_upgrade_replset.js
      jstests/noPassthrough/geo_full.js
      jstests/noPassthrough/indexbg1.js
      jstests/noPassthrough/update_server-5552.js
      jstests/sharding/read_pref_cmd.js
      jstests/sharding/rename.js

            Assignee:
            Irina Yatsenko (Inactive)
            Reporter:
            Irina Yatsenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: