The jstests/sharding/auth.js test doesn't directly assert the addShard command succeeded. It instead relies on awaitRSClientHosts() to ensure mongos eventually starts opening connections to the "d2" shard. We've historically seen the addShard command fail due to an NetworkInterfaceExceededTimeLimit error and manifest as an assert.soon() failure.
Adding an assert.commandWorked() would make the manifestation of these failures in Evergreen more obvious.
print("adding shard " + shardName); login(adminUser); print("logged in"); result = s.getDB("admin").runCommand({addShard: shardName}); awaitRSClientHosts(s.s, d1.nodes, {ok: true}); awaitRSClientHosts(s.s, d2.nodes, {ok: true});