diff options
author | jannaerin <golden.janna@gmail.com> | 2018-03-14 14:39:17 -0400 |
---|---|---|
committer | jannaerin <golden.janna@gmail.com> | 2018-03-14 17:46:39 -0400 |
commit | b5ef3780e6956b51659e953080d783f67ca31b64 (patch) | |
tree | dc5204165d2deef8a51b31d38e873e8ea174ea77 /jstests | |
parent | 1b0fd9388bf1a782e9d67eab2215503576e5ca59 (diff) | |
download | mongo-b5ef3780e6956b51659e953080d783f67ca31b64.tar.gz |
SERVER-33882 Add requires_sharding tag to sharding tests
Diffstat (limited to 'jstests')
44 files changed, 62 insertions, 4 deletions
diff --git a/jstests/auth/access_control_with_unreachable_configs.js b/jstests/auth/access_control_with_unreachable_configs.js index 65b0f212242..edb85c5bb76 100644 --- a/jstests/auth/access_control_with_unreachable_configs.js +++ b/jstests/auth/access_control_with_unreachable_configs.js @@ -2,6 +2,7 @@ // localhost exception does not apply. That is, if mongos cannot verify that there // are user documents stored in the configuration information, it must assume that // there are. +// @tags: [requires_sharding] var dopts = {smallfiles: "", nopreallocj: ""}; diff --git a/jstests/auth/auth_mechanism_discovery.js b/jstests/auth/auth_mechanism_discovery.js index 4c76049ce53..ec95076cfda 100644 --- a/jstests/auth/auth_mechanism_discovery.js +++ b/jstests/auth/auth_mechanism_discovery.js @@ -1,4 +1,5 @@ // Tests that a client will auto-discover a user's supported SASL mechanisms during auth(). +// @tags: [requires_sharding] (function() { "use strict"; diff --git a/jstests/auth/authz_modifications_access_control.js b/jstests/auth/authz_modifications_access_control.js index 874135a2d3e..11b9a59e593 100644 --- a/jstests/auth/authz_modifications_access_control.js +++ b/jstests/auth/authz_modifications_access_control.js @@ -1,5 +1,6 @@ /** * This tests that the proper access control is enforced around modifications to user and role data. + * @tags: [requires_sharding] */ function runTest(conn) { diff --git a/jstests/auth/basic_role_auth.js b/jstests/auth/basic_role_auth.js index 3203fec9cac..9f8abffae40 100644 --- a/jstests/auth/basic_role_auth.js +++ b/jstests/auth/basic_role_auth.js @@ -10,6 +10,7 @@ * 2nd level field name: user names. * 3rd level is an object that has the format: * { pwd: <password>, roles: [<list of roles>] } + * @tags: [requires_sharding] */ var AUTH_INFO = { admin: { diff --git a/jstests/auth/clac_system_colls.js b/jstests/auth/clac_system_colls.js index b62a9df3e5a..0b2fd75d69f 100644 --- a/jstests/auth/clac_system_colls.js +++ b/jstests/auth/clac_system_colls.js @@ -1,5 +1,6 @@ /** * This tests that CLAC (collection level access control) handles system collections properly. + * @tags: [requires_sharding] */ // Verify that system collections are treated correctly diff --git a/jstests/auth/commands_builtin_roles.js b/jstests/auth/commands_builtin_roles.js index e0ac4786d10..93eef01bcd6 100644 --- a/jstests/auth/commands_builtin_roles.js +++ b/jstests/auth/commands_builtin_roles.js @@ -5,6 +5,8 @@ Exhaustive test for authorization of commands with builtin roles. The test logic implemented here operates on the test cases defined in jstests/auth/commands.js. +@tags: [requires_sharding] + */ load("jstests/auth/lib/commands_lib.js"); diff --git a/jstests/auth/commands_user_defined_roles.js b/jstests/auth/commands_user_defined_roles.js index 739f4eb7a4f..ad75b5e1d83 100644 --- a/jstests/auth/commands_user_defined_roles.js +++ b/jstests/auth/commands_user_defined_roles.js @@ -5,6 +5,8 @@ Exhaustive test for authorization of commands with user-defined roles. The test logic implemented here operates on the test cases defined in jstests/auth/commands.js. +@tags: [requires_sharding] + */ // constants diff --git a/jstests/auth/copyauth2.js b/jstests/auth/copyauth2.js index f47bfcba8ad..3355e6d67d1 100644 --- a/jstests/auth/copyauth2.js +++ b/jstests/auth/copyauth2.js @@ -1,4 +1,5 @@ // Basic test that copydb works with auth enabled when copying within the same cluster +// @tags: [requires_sharding] function runTest(a, b) { a.createUser({user: "chevy", pwd: "chase", roles: ["read", {role: 'readWrite', db: b._name}]}); diff --git a/jstests/auth/getMore.js b/jstests/auth/getMore.js index ae6c58a8578..999fa733be8 100644 --- a/jstests/auth/getMore.js +++ b/jstests/auth/getMore.js @@ -1,4 +1,5 @@ // Tests that a user can only run a getMore on a cursor that they created. +// @tags: [requires_sharding] (function() { "use strict"; diff --git a/jstests/auth/kill_cursors.js b/jstests/auth/kill_cursors.js index d8a9173c321..2fd3d7054f8 100644 --- a/jstests/auth/kill_cursors.js +++ b/jstests/auth/kill_cursors.js @@ -1,4 +1,5 @@ // Test the killCursors command. +// @tags: [requires_sharding] (function() { 'use strict'; diff --git a/jstests/auth/killop_own_ops.js b/jstests/auth/killop_own_ops.js index c128e7f0ba0..fec062b50e8 100644 --- a/jstests/auth/killop_own_ops.js +++ b/jstests/auth/killop_own_ops.js @@ -4,6 +4,7 @@ * Theory of operation: Create a long running operation from a user which does not have the killOp * or inProg privileges. Using the same user, run currentOp to get the opId, and then run killOp * against it. + * @tags: [requires_sharding] */ (function() { diff --git a/jstests/auth/list_all_local_sessions.js b/jstests/auth/list_all_local_sessions.js index a5c46d9c257..8e889feb4e2 100644 --- a/jstests/auth/list_all_local_sessions.js +++ b/jstests/auth/list_all_local_sessions.js @@ -1,4 +1,5 @@ // Auth tests for the $listLocalSessions {allUsers:true} aggregation stage. +// @tags: [requires_sharding] (function() { 'use strict'; diff --git a/jstests/auth/list_all_sessions.js b/jstests/auth/list_all_sessions.js index f3552006b58..35a4e3b3c06 100644 --- a/jstests/auth/list_all_sessions.js +++ b/jstests/auth/list_all_sessions.js @@ -1,4 +1,5 @@ // Auth tests for the $listSessions {allUsers:true} aggregation stage. +// @tags: [requires_sharding] (function() { 'use strict'; diff --git a/jstests/auth/list_sessions.js b/jstests/auth/list_sessions.js index aa3eb0e627c..e6c14a11c4c 100644 --- a/jstests/auth/list_sessions.js +++ b/jstests/auth/list_sessions.js @@ -1,4 +1,7 @@ -// Auth tests for the $listSessions aggregation pipeline. +/** + * Auth tests for the $listSessions aggregation pipeline. + * @tags: [requires_sharding] + */ (function() { 'use strict'; diff --git a/jstests/auth/log_user_basic.js b/jstests/auth/log_user_basic.js index 298aa1f2eb5..dbfe90c25da 100644 --- a/jstests/auth/log_user_basic.js +++ b/jstests/auth/log_user_basic.js @@ -1,5 +1,6 @@ /** * This file tests that "user:<username>@<db>" shows up in the logs. + * @tags: [requires_sharding] */ // TODO(schwerin) Re-enable this test after resolving corresponding TODO in mongo/util/log.cpp. diff --git a/jstests/auth/log_userid_off.js b/jstests/auth/log_userid_off.js index 23e90b6fd1e..0232db94aee 100644 --- a/jstests/auth/log_userid_off.js +++ b/jstests/auth/log_userid_off.js @@ -2,6 +2,7 @@ * Tests that logged users will not show up in the log. * * @param mongo {Mongo} connection object. + * @tags: [requires_sharding] */ var doTest = function(mongo, callSetParam) { var TEST_USER = 'foo'; diff --git a/jstests/auth/mergeAuthCollsCommand.js b/jstests/auth/mergeAuthCollsCommand.js index d5084d76a85..2640e5c77d5 100644 --- a/jstests/auth/mergeAuthCollsCommand.js +++ b/jstests/auth/mergeAuthCollsCommand.js @@ -1,5 +1,6 @@ /** * Tests the behavior of the _mergeAuthzCollections command. + * @tags: [requires_sharding] */ function assertUsersAndRolesHaveRole(admin, role) { diff --git a/jstests/auth/mongos_cache_invalidation.js b/jstests/auth/mongos_cache_invalidation.js index 14571b7e3fc..1f7064f558d 100644 --- a/jstests/auth/mongos_cache_invalidation.js +++ b/jstests/auth/mongos_cache_invalidation.js @@ -1,6 +1,7 @@ /** * This tests that updates to user and role definitions made on one mongos propagate properly * to other mongoses. + * @tags: [requires_sharding] */ var authzErrorCode = 13; diff --git a/jstests/auth/pseudo_commands.js b/jstests/auth/pseudo_commands.js index 42f1996aa54..29134f8bca7 100644 --- a/jstests/auth/pseudo_commands.js +++ b/jstests/auth/pseudo_commands.js @@ -2,6 +2,7 @@ * This tests the access control for the pseudo-commands inprog, curop, and killop. Once * SERVER-5466 is resolved this test should be removed and its functionality merged into * commands_builtin_roles.js and commands_user_defined_roles.js. + * @tags: [requires_sharding] */ function runTest(conn) { diff --git a/jstests/auth/role_management_commands_edge_cases.js b/jstests/auth/role_management_commands_edge_cases.js index 390c90cc505..9dd774d5518 100644 --- a/jstests/auth/role_management_commands_edge_cases.js +++ b/jstests/auth/role_management_commands_edge_cases.js @@ -1,6 +1,7 @@ /** * This tests that all the different commands for role manipulation all properly handle invalid * and atypical inputs. + * @tags: [requires_sharding] */ function runTest(conn) { diff --git a/jstests/auth/role_management_commands_sharded_wc_1.js b/jstests/auth/role_management_commands_sharded_wc_1.js index 417bad0fadf..400e85b0029 100644 --- a/jstests/auth/role_management_commands_sharded_wc_1.js +++ b/jstests/auth/role_management_commands_sharded_wc_1.js @@ -1,3 +1,5 @@ +// @tags: [requires_sharding] + (function() { 'use strict'; diff --git a/jstests/auth/role_management_commands_sharded_wc_majority.js b/jstests/auth/role_management_commands_sharded_wc_majority.js index ba44cf49dc3..6bda9c5288a 100644 --- a/jstests/auth/role_management_commands_sharded_wc_majority.js +++ b/jstests/auth/role_management_commands_sharded_wc_majority.js @@ -1,3 +1,7 @@ +/** + * @tags: [requires_sharding] + */ + (function() { 'use strict'; diff --git a/jstests/auth/sasl_mechanism_discovery.js b/jstests/auth/sasl_mechanism_discovery.js index 58ccb011090..06e93e6e052 100644 --- a/jstests/auth/sasl_mechanism_discovery.js +++ b/jstests/auth/sasl_mechanism_discovery.js @@ -1,4 +1,5 @@ // Tests that a client may discover a user's supported SASL mechanisms via isMaster. +// @tags: [requires_sharding] (function() { "use strict"; diff --git a/jstests/auth/user_defined_roles.js b/jstests/auth/user_defined_roles.js index ffdca820d98..221c8c06e5a 100644 --- a/jstests/auth/user_defined_roles.js +++ b/jstests/auth/user_defined_roles.js @@ -1,6 +1,7 @@ /** * This tests that user defined roles actually grant users the ability to perform the actions they * should, and that changing the privileges assigned to roles changes the access granted to the user + * @tags: [requires_sharding] */ function runTest(conn) { diff --git a/jstests/auth/user_management_commands_edge_cases.js b/jstests/auth/user_management_commands_edge_cases.js index 5c0104226b7..4260bfd6ab1 100644 --- a/jstests/auth/user_management_commands_edge_cases.js +++ b/jstests/auth/user_management_commands_edge_cases.js @@ -1,6 +1,7 @@ /** * This tests that all the different commands for user manipulation all properly handle invalid and * atypical inputs. + * @tags: [requires_sharding] */ function runTest(conn) { diff --git a/jstests/auth/user_management_commands_sharded_wc_1.js b/jstests/auth/user_management_commands_sharded_wc_1.js index 6f1922d67f6..f5dd2222636 100644 --- a/jstests/auth/user_management_commands_sharded_wc_1.js +++ b/jstests/auth/user_management_commands_sharded_wc_1.js @@ -1,3 +1,7 @@ +/** + * @tags: [requires_sharding] + */ + (function() { 'use strict'; diff --git a/jstests/auth/user_management_commands_sharded_wc_majority.js b/jstests/auth/user_management_commands_sharded_wc_majority.js index b7a9e04b22a..e06f4b578c0 100644 --- a/jstests/auth/user_management_commands_sharded_wc_majority.js +++ b/jstests/auth/user_management_commands_sharded_wc_majority.js @@ -1,3 +1,5 @@ +// @tags: [requires_sharding] + (function() { 'use strict'; diff --git a/jstests/auth/views_authz.js b/jstests/auth/views_authz.js index 68c28ec03ea..e22dcf86cb6 100644 --- a/jstests/auth/views_authz.js +++ b/jstests/auth/views_authz.js @@ -1,6 +1,7 @@ /** * Tests authorization special cases with views. These are special exceptions that prohibit certain * operations on views even if the user has an explicit privilege on that view. + * @tags: [requires_sharding] */ (function() { "use strict"; diff --git a/jstests/fail_point/fail_point.js b/jstests/fail_point/fail_point.js index a16971857b6..c39238344a3 100644 --- a/jstests/fail_point/fail_point.js +++ b/jstests/fail_point/fail_point.js @@ -1,3 +1,5 @@ +// @tags: [requires_sharding] + (function() { 'use strict'; diff --git a/jstests/noPassthrough/client_metadata_log.js b/jstests/noPassthrough/client_metadata_log.js index dd3fcc8c076..f1b90492ce6 100644 --- a/jstests/noPassthrough/client_metadata_log.js +++ b/jstests/noPassthrough/client_metadata_log.js @@ -1,5 +1,6 @@ /** * Test that verifies client metadata is logged into log file on new connections. + * @tags: [requires_sharding] */ (function() { 'use strict'; diff --git a/jstests/noPassthrough/cross_user_getmore_has_no_side_effects.js b/jstests/noPassthrough/cross_user_getmore_has_no_side_effects.js index 008a208734a..bed13b06bec 100644 --- a/jstests/noPassthrough/cross_user_getmore_has_no_side_effects.js +++ b/jstests/noPassthrough/cross_user_getmore_has_no_side_effects.js @@ -1,6 +1,8 @@ // Test that a user is not allowed to getMore a cursor they did not create, and that such a failed // getMore will leave the cursor unaffected, so that a subsequent getMore by the original author // will work. +// @tags: [requires_sharding] + (function() { // TODO: Remove 'shardAsReplicaSet: false' when SERVER-32672 is fixed. const st = new ShardingTest( diff --git a/jstests/noPassthrough/exit_logging.js b/jstests/noPassthrough/exit_logging.js index 67f73eb2ed9..c6c4e117fda 100644 --- a/jstests/noPassthrough/exit_logging.js +++ b/jstests/noPassthrough/exit_logging.js @@ -1,5 +1,6 @@ /** * Tests that various forms of normal and abnormal shutdown write to the log files as expected. + * @tags: [requires_sharding] */ (function() { diff --git a/jstests/noPassthrough/ftdc_setdirectory.js b/jstests/noPassthrough/ftdc_setdirectory.js index 948c7889b91..33877883fa3 100644 --- a/jstests/noPassthrough/ftdc_setdirectory.js +++ b/jstests/noPassthrough/ftdc_setdirectory.js @@ -1,5 +1,6 @@ /** * Test that verifies FTDC works in mongos. + * @tags: [requires_sharding] */ load('jstests/libs/ftdc.js'); diff --git a/jstests/noPassthrough/logical_session_cursor_checks.js b/jstests/noPassthrough/logical_session_cursor_checks.js index efd4f6cf815..a12f46fc583 100644 --- a/jstests/noPassthrough/logical_session_cursor_checks.js +++ b/jstests/noPassthrough/logical_session_cursor_checks.js @@ -1,3 +1,5 @@ +// @tags: [requires_sharding] + (function() { 'use strict'; diff --git a/jstests/noPassthrough/max_acceptable_logical_clock_drift_secs_parameter.js b/jstests/noPassthrough/max_acceptable_logical_clock_drift_secs_parameter.js index a7b75b31844..21002259683 100644 --- a/jstests/noPassthrough/max_acceptable_logical_clock_drift_secs_parameter.js +++ b/jstests/noPassthrough/max_acceptable_logical_clock_drift_secs_parameter.js @@ -2,6 +2,7 @@ * Tests what values are accepted for the maxAcceptableLogicalClockDriftSecs startup parameter, and * that servers in a sharded clusters reject cluster times more than * maxAcceptableLogicalClockDriftSecs ahead of their wall clocks. + * @tags: [requires_sharding] */ (function() { "use strict"; diff --git a/jstests/noPassthrough/readConcern_atClusterTime_noop_write.js b/jstests/noPassthrough/readConcern_atClusterTime_noop_write.js index 8a7b7c538c0..ad6bda26619 100644 --- a/jstests/noPassthrough/readConcern_atClusterTime_noop_write.js +++ b/jstests/noPassthrough/readConcern_atClusterTime_noop_write.js @@ -1,5 +1,6 @@ // Test that 'atClusterTime' triggers a noop write to advance the majority commit point if // necessary. +// @tags: [requires_sharding] (function() { "use strict"; diff --git a/jstests/noPassthrough/readConcern_snapshot_mongos.js b/jstests/noPassthrough/readConcern_snapshot_mongos.js index 05e31bc6245..ab176bf14fb 100644 --- a/jstests/noPassthrough/readConcern_snapshot_mongos.js +++ b/jstests/noPassthrough/readConcern_snapshot_mongos.js @@ -1,5 +1,5 @@ // Test parsing of readConcern level 'snapshot'. -// @tags: [requires_replication] +// @tags: [requires_replication,requires_sharding] (function() { "use strict"; diff --git a/jstests/noPassthrough/read_majority_reads.js b/jstests/noPassthrough/read_majority_reads.js index 768e5f79dd6..c8322a31c67 100644 --- a/jstests/noPassthrough/read_majority_reads.js +++ b/jstests/noPassthrough/read_majority_reads.js @@ -14,6 +14,7 @@ * Each operation is tested on a single node, and (if supported) through mongos on both sharded and * unsharded collections. Mongos doesn't directly handle readConcern majority, but these tests * should ensure that it correctly propagates the setting to the shards when running commands. + * @tags: [requires_sharding] */ (function() { diff --git a/jstests/noPassthrough/retryable_writes_mmap.js b/jstests/noPassthrough/retryable_writes_mmap.js index b5747bbf5bb..7efac46e625 100644 --- a/jstests/noPassthrough/retryable_writes_mmap.js +++ b/jstests/noPassthrough/retryable_writes_mmap.js @@ -1,6 +1,7 @@ /* * Verify that retryable writes aren't allowed on mmapv1, because it doesn't have document-level * locking. + * @tags: [requires_sharding] */ (function() { "use strict"; diff --git a/jstests/noPassthrough/skip_sharding_configuration_checks.js b/jstests/noPassthrough/skip_sharding_configuration_checks.js index 0e55d811aa6..bbb0d2b868b 100644 --- a/jstests/noPassthrough/skip_sharding_configuration_checks.js +++ b/jstests/noPassthrough/skip_sharding_configuration_checks.js @@ -1,6 +1,6 @@ /** * Starts standalone RS with skipShardingConfigurationChecks. - * @tags: [requires_persistence, requires_replication] + * @tags: [requires_persistence, requires_replication, requires_sharding] */ (function() { 'use strict'; diff --git a/jstests/noPassthrough/stepdown_query.js b/jstests/noPassthrough/stepdown_query.js index bb7a0d99dfc..36ae6289075 100644 --- a/jstests/noPassthrough/stepdown_query.js +++ b/jstests/noPassthrough/stepdown_query.js @@ -1,7 +1,7 @@ /** * Tests that a query with default read preference ("primary") will succeed even if the node being * queried steps down before the final result batch has been delivered. - * @tags: [requires_replication] + * @tags: [requires_replication, requires_sharding] */ // Checking UUID consistency involves talking to a shard node, which in this test is shutdown diff --git a/jstests/noPassthrough/unsupported_change_stream_deployments.js b/jstests/noPassthrough/unsupported_change_stream_deployments.js index 9492caafb64..6bc969abca7 100644 --- a/jstests/noPassthrough/unsupported_change_stream_deployments.js +++ b/jstests/noPassthrough/unsupported_change_stream_deployments.js @@ -1,4 +1,6 @@ // Tests that the $changeStream stage returns an error when run against a standalone mongod. +// @tags: [requires_sharding] + (function() { "use strict"; load("jstests/aggregation/extras/utils.js"); // For assertErrorCode. diff --git a/jstests/noPassthrough/verify_session_cache_updates.js b/jstests/noPassthrough/verify_session_cache_updates.js index e2d51bd27e5..0f4e6cb39c1 100644 --- a/jstests/noPassthrough/verify_session_cache_updates.js +++ b/jstests/noPassthrough/verify_session_cache_updates.js @@ -1,3 +1,5 @@ +// @tags: [requires_sharding] + (function() { 'use strict'; diff --git a/jstests/noPassthroughWithMongod/replReads.js b/jstests/noPassthroughWithMongod/replReads.js index a3d356def61..30d6ba2791c 100644 --- a/jstests/noPassthroughWithMongod/replReads.js +++ b/jstests/noPassthroughWithMongod/replReads.js @@ -1,4 +1,5 @@ // Test that doing slaveOk reads from secondaries hits all the secondaries evenly +// @tags: [requires_sharding] function testReadLoadBalancing(numReplicas) { var s = |