Skip to content

Commit 4126669

Browse files
committed
PSMDB-1786: fix variable declarations in audit jstests
1 parent aa55016 commit 4126669

23 files changed

+30
-30
lines changed

jstests/audit/audit_add_shard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ auditTestShard('addShard', function(st) {
2424
assert.commandWorked(st.s0.adminCommand({addshard: connstr}));
2525

2626
const beforeLoad = Date.now();
27-
auditColl = loadAuditEventsIntoCollection(
27+
let auditColl = loadAuditEventsIntoCollection(
2828
st.s0, getDBPath() + '/auditLog-s0.json', jsTestName(), 'auditEvents');
2929
assert.eq(1,
3030
auditColl.count({

jstests/audit/audit_authz_application_message.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ auditTest('auth_logApplicationMessage', function(m) {
2222
assert.commandWorked(adminDB.runCommand({logApplicationMessage: msg}));
2323

2424
const beforeLoad = Date.now();
25-
auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
25+
const auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
2626
assert.eq(1,
2727
auditColl.count({
2828
atype: "applicationMessage",

jstests/audit/audit_authz_command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ auditTest('authzCommand', function(m) {
4040

4141
// Verify that audit event was inserted.
4242
const beforeLoad = Date.now();
43-
auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
43+
var auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
4444

4545
// Audit event for user tom.
4646
assert.eq(1,

jstests/audit/audit_authz_current_op.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ auditTest('authzInProg', function(m) {
4343

4444
// Verify that audit event was inserted.
4545
const beforeLoad = Date.now();
46-
auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
46+
var auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
4747

4848
// Audit event for user tom
4949
assert.eq(1,

jstests/audit/audit_authz_delete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ auditTest('authzDelete', function(m) {
4343

4444
// Verify that audit event was inserted.
4545
const beforeLoad = Date.now();
46-
auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
46+
var auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
4747

4848
// Audit event for user tom.
4949
assert.eq(1,

jstests/audit/audit_authz_find.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ auditTest('authzQuery', function(m) {
5353

5454
// Verify that audit event was inserted.
5555
const beforeLoad = Date.now();
56-
auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
56+
var auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
5757

5858
// Audit event for user tom
5959
assert.eq(1,

jstests/audit/audit_authz_get_more.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ auditTest('authzGetMore', function(m) {
7070

7171
// Verify that audit event was inserted.
7272
const beforeLoad = Date.now();
73-
auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
73+
var auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
7474

7575
// Audit event for user tom
7676
assert.eq(1,

jstests/audit/audit_authz_insert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ auditTest('authzInsert', function(m) {
4040

4141
// Verify that audit event was inserted.
4242
const beforeLoad = Date.now();
43-
auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
43+
var auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
4444

4545
// Audit event for user tom
4646
assert.eq(1,

jstests/audit/audit_authz_kill_op.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ auditTest('authzKillOp', function(m) {
5454

5555
// Verify that audit event was inserted.
5656
const beforeLoad = Date.now();
57-
auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
57+
var auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
5858

5959
// Audit event for user tom
6060
assert.eq(1,

jstests/audit/audit_authz_update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ auditTest('authzUpdate', function(m) {
4141

4242
// Verify that audit event was inserted.
4343
const beforeLoad = Date.now();
44-
auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
44+
var auditColl = getAuditEventsCollection(m, testDBName, undefined, true);
4545

4646
// Audit event for user tom.
4747
assert.eq(1,

0 commit comments

Comments
 (0)