From af44617f264c0a2338759debe37ad1d7e353d2ab Mon Sep 17 00:00:00 2001 From: Maria van Keulen Date: Fri, 13 Oct 2017 17:37:14 -0400 Subject: SERVER-29448 Disallow removing the admin database in replica set mode --- jstests/auth/user_defined_roles_on_secondaries.js | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'jstests/auth') diff --git a/jstests/auth/user_defined_roles_on_secondaries.js b/jstests/auth/user_defined_roles_on_secondaries.js index 1eb3566985f..c405363c575 100644 --- a/jstests/auth/user_defined_roles_on_secondaries.js +++ b/jstests/auth/user_defined_roles_on_secondaries.js @@ -134,14 +134,6 @@ assertListContainsRole(role.inheritedRoles, {role: "dbAdmin", db: "db1"}, node); }); - // Verify that dropping the admin database propagates. - assert.commandWorked(rstest.getPrimary().getDB("admin").dropDatabase()); - assert.commandWorked(rstest.getPrimary().getDB("admin").getLastErrorObj(2)); - rstest.nodes.forEach(function(node) { - var roles = node.getDB("db1").getRoles(); - assert.eq(0, roles.length, node); - }); - // Verify that applyOps commands propagate. // NOTE: This section of the test depends on the oplog and roles schemas. assert.commandWorked(rstest.getPrimary().getDB("admin").runCommand({ @@ -171,15 +163,6 @@ } }, {op: "c", ns: "admin.$cmd", o: {drop: "system.roles"}}, - ] - })); - - // The dropDatabase command cannot be run inside an applyOps if it still has any collections - // (drop-pending included). See SERVER-29874. - assert.commandWorked(rstest.getPrimary().getDB("admin").dropDatabase()); - - assert.commandWorked(rstest.getPrimary().getDB("admin").runCommand({ - applyOps: [ {op: "c", ns: "admin.$cmd", o: {create: "system.roles"}}, { op: "i", -- cgit v1.2.1