jstests/auth/auth-counters.js
// successful attempts made using the fallback (SCRAM-SHA-256) has NOT been incremented
successful attempts made using the fallback (SCRAM-SHA-256) has NOT been incremented
successful attempts made using the fallback ( SCRAM - SHA - 256 ) has NOT been incremented
function assertFailureInternal() {
    const mech = "SCRAM-SHA-256";
    assert.throws(authutil.asCluster, [replTest.nodes, badKeyfile, () => true]);
    ++expected[mech].authenticate.received;
    ++expected[mech].clusterAuthenticate.received;
    assertSuccess({user: 'admin', pwd: 'pwd'}, 'SCRAM-SHA-256', admin);
    assertStats();
}
function assertFailureInternal ( ) { const mech = "SCRAM-SHA-256" ; assert . throws ( authutil . asCluster , [ replTest . nodes , badKeyfile , ( ) => true ] ) ; ++ expected [ mech ] . authenticate . received ; ++ expected [ mech ] . clusterAuthenticate . received ; assertSuccess ( { user : 'admin' , pwd : 'pwd' } , 'SCRAM-SHA-256' , admin ) ; assertStats ( ) ; }
successful attempts made using the fallback (SCRAM-SHA-256) has NOT been incremented
successful attempts made using the fallback ( SCRAM - SHA - 256 ) has NOT been incremented
// If asCluster fails, it explodes. // we have to re-auth as admin to get stats, which are validated at the end of assertSuccess