summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorKim Tao <kimberly.tao@mongodb.com>2018-12-12 17:37:12 -0500
committerKim Tao <kimberly.tao@mongodb.com>2019-01-10 10:50:35 -0500
commit47262867106c18aec3bc385dc13a5b0e90f33e7f (patch)
tree4b1f94b68fd17e0c63aaa8a471e668739cfec76c /jstests
parent9fd676fd83639f5ab55f733cd63ff2f8e57baa84 (diff)
downloadmongo-47262867106c18aec3bc385dc13a5b0e90f33e7f.tar.gz
SERVER-33226: remove getPrevError() command
Diffstat (limited to 'jstests')
-rw-r--r--jstests/auth/lib/commands_lib.js9
-rw-r--r--jstests/core/views/views_all_commands.js1
-rw-r--r--jstests/gle/core/error1.js11
-rw-r--r--jstests/gle/core/remove5.js4
-rw-r--r--jstests/gle/core/update4.js4
-rw-r--r--jstests/sharding/database_and_shard_versioning_all_commands.js1
-rw-r--r--jstests/sharding/libs/last_stable_mongos_commands.js1
-rw-r--r--jstests/sharding/safe_secondary_reads_drop_recreate.js1
-rw-r--r--jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js1
-rw-r--r--jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js1
10 files changed, 1 insertions, 33 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 3c2b9e6aec1..2f4f3a6ee8b 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -4267,15 +4267,6 @@ var authCommandsLib = {
]
},
{
- testname: "getPrevError",
- command: {getPrevError: 1},
- skipSharded: true,
- testcases: [
- {runOnDb: firstDbName, roles: roles_all, privileges: []},
- {runOnDb: secondDbName, roles: roles_all, privileges: []}
- ]
- },
- {
testname: "getShardMap",
command: {getShardMap: "x"},
testcases: [
diff --git a/jstests/core/views/views_all_commands.js b/jstests/core/views/views_all_commands.js
index 045497b3033..c5bafd7671b 100644
--- a/jstests/core/views/views_all_commands.js
+++ b/jstests/core/views/views_all_commands.js
@@ -300,7 +300,6 @@
}
},
getParameter: {skip: isUnrelated},
- getPrevError: {skip: isUnrelated},
getShardMap: {skip: isUnrelated},
getShardVersion: {
command: {getShardVersion: "test.view"},
diff --git a/jstests/gle/core/error1.js b/jstests/gle/core/error1.js
index 5fd244aff30..dac5fdd3f40 100644
--- a/jstests/gle/core/error1.js
+++ b/jstests/gle/core/error1.js
@@ -3,38 +3,27 @@ db.jstests_error1.drop();
// test 1
db.runCommand({reseterror: 1});
assert(db.runCommand({getlasterror: 1}).err == null, "A");
-assert(db.runCommand({getpreverror: 1}).err == null, "B");
db.resetError();
assert(db.getLastError() == null, "C");
-assert(db.getPrevError().err == null, "preverror 1");
// test 2
db.runCommand({insert: "x", documents: [{_id: 1, a: "xx"}, {_id: 1, b: "xx"}]});
assert(db.runCommand({getlasterror: 1}).err != null, "D");
-assert(db.runCommand({getpreverror: 1}).err != null, "E");
assert(db.getLastError() != null, "F");
-assert(db.getPrevError().err != null, "preverror 2");
-assert(db.getPrevError().nPrev == 1, "G");
db.jstests_error1.findOne();
assert(db.runCommand({getlasterror: 1}).err == null, "H");
-assert(db.runCommand({getpreverror: 1}).err != null, "I");
-assert(db.runCommand({getpreverror: 1}).nPrev == 2, "J");
db.jstests_error1.findOne();
assert(db.runCommand({getlasterror: 1}).err == null, "K");
-assert(db.runCommand({getpreverror: 1}).err != null, "L");
-assert(db.runCommand({getpreverror: 1}).nPrev == 3, "M");
db.resetError();
db.forceError();
db.jstests_error1.findOne();
assert(db.getLastError() == null, "getLastError 5");
-assert(db.getPrevError().err != null, "preverror 3");
// test 3
db.runCommand({reseterror: 1});
-assert(db.runCommand({getpreverror: 1}).err == null, "N");
diff --git a/jstests/gle/core/remove5.js b/jstests/gle/core/remove5.js
index 4a9393ea202..c8ac20b72d2 100644
--- a/jstests/gle/core/remove5.js
+++ b/jstests/gle/core/remove5.js
@@ -15,10 +15,6 @@ for (i = 0; i < 10; ++i) {
}
f.remove({});
assert.eq(10, getLastError().n);
-assert.eq(10, db.getPrevError().n);
-assert.eq(1, db.getPrevError().nPrev);
f.findOne();
assert.eq(0, getLastError().n);
-assert.eq(10, db.getPrevError().n);
-assert.eq(2, db.getPrevError().nPrev);
diff --git a/jstests/gle/core/update4.js b/jstests/gle/core/update4.js
index 83dbf717019..6e7dd68c35c 100644
--- a/jstests/gle/core/update4.js
+++ b/jstests/gle/core/update4.js
@@ -21,13 +21,9 @@ assert.eq(1, getLastError().n, "F");
f.update({a: 1}, {a: 1}, true);
assert.eq(true, getLastError().updatedExisting, "G");
assert.eq(1, getLastError().n, "H");
-assert.eq(true, db.getPrevError().updatedExisting, "I");
-assert.eq(1, db.getPrevError().nPrev, "J");
f.findOne();
assert.eq(undefined, getLastError().updatedExisting, "K");
-assert.eq(true, db.getPrevError().updatedExisting, "L");
-assert.eq(2, db.getPrevError().nPrev, "M");
db.forceError();
assert.eq(undefined, getLastError().updatedExisting, "N");
diff --git a/jstests/sharding/database_and_shard_versioning_all_commands.js b/jstests/sharding/database_and_shard_versioning_all_commands.js
index 85773bfb19e..3f09d715465 100644
--- a/jstests/sharding/database_and_shard_versioning_all_commands.js
+++ b/jstests/sharding/database_and_shard_versioning_all_commands.js
@@ -225,7 +225,6 @@
getLog: {skip: "executes locally on mongos (not sent to any remote node)"},
getMore: {skip: "requires a previously established cursor"},
getParameter: {skip: "executes locally on mongos (not sent to any remote node)"},
- getPrevError: {skip: "not supported in mongos"},
getShardMap: {skip: "executes locally on mongos (not sent to any remote node)"},
getShardVersion: {skip: "executes locally on mongos (not sent to any remote node)"},
getnonce: {skip: "not on a user database"},
diff --git a/jstests/sharding/libs/last_stable_mongos_commands.js b/jstests/sharding/libs/last_stable_mongos_commands.js
index 5e06996374b..6072600450a 100644
--- a/jstests/sharding/libs/last_stable_mongos_commands.js
+++ b/jstests/sharding/libs/last_stable_mongos_commands.js
@@ -8,6 +8,7 @@ const commandsRemovedFromMongosIn42 = [
'copydbsaslstart',
'eval',
'geoNear',
+ 'getPrevError',
'group',
'reIndex',
];
diff --git a/jstests/sharding/safe_secondary_reads_drop_recreate.js b/jstests/sharding/safe_secondary_reads_drop_recreate.js
index 64f4cbbcf52..e1b8d9ac9b4 100644
--- a/jstests/sharding/safe_secondary_reads_drop_recreate.js
+++ b/jstests/sharding/safe_secondary_reads_drop_recreate.js
@@ -178,7 +178,6 @@
getLog: {skip: "does not return user data"},
getMore: {skip: "shard version already established"},
getParameter: {skip: "does not return user data"},
- getPrevError: {skip: "does not return user data"},
getShardMap: {skip: "does not return user data"},
getShardVersion: {skip: "primary only"},
getnonce: {skip: "does not return user data"},
diff --git a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
index 720fcd27fd3..17cc9489abf 100644
--- a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
+++ b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
@@ -208,7 +208,6 @@
getLog: {skip: "does not return user data"},
getMore: {skip: "shard version already established"},
getParameter: {skip: "does not return user data"},
- getPrevError: {skip: "does not return user data"},
getShardMap: {skip: "does not return user data"},
getShardVersion: {skip: "primary only"},
getnonce: {skip: "does not return user data"},
diff --git a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
index e85cd608d32..985c84b6aea 100644
--- a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
+++ b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
@@ -181,7 +181,6 @@
getLog: {skip: "does not return user data"},
getMore: {skip: "shard version already established"},
getParameter: {skip: "does not return user data"},
- getPrevError: {skip: "does not return user data"},
getShardMap: {skip: "does not return user data"},
getShardVersion: {skip: "primary only"},
getnonce: {skip: "does not return user data"},