Skip to content

Commit

Permalink
SERVER-80264 Groom jstest tags and refactor simulate ap override
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst authored and Evergreen Agent committed Aug 23, 2023
1 parent 9a06b60 commit 0893121
Show file tree
Hide file tree
Showing 285 changed files with 1,120 additions and 714 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ selector:
- jstests/change_streams/queryable_encryption_change_stream.js

exclude_with_any_tags:
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible
##
# The next tags correspond to the special errors thrown by the
# set_read_and_write_concerns.js override when it refuses to replace the readConcern or
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
test_kind: js_test

selector:
roots:
- jstests/core/**/*.js

exclude_with_any_tags:
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible
# Exclude tests which we know use commands that don't support a security token.
- not_allowed_with_security_token
# Exclude tests which use commands that aren't supported in Serverless.
- command_not_supported_in_serverless
# Theses tests expect replication is not enabled.
- assumes_standalone_mongod
# Capped collections are banned in Serverless.
- requires_capped
# Server side javascript (such as $where, $function, $accumulator and map-reduce) is not allowed in Serverless.
- requires_scripting
- requires_profiling
# Skip any tests that run with auth explicitly.
- requires_auth
# Skip any tests that use transactions
- uses_transactions

# # These tests have operatons on "local" or "config" db which are blocked by Atlas Proxy.
# - jstests/core/catalog/list_indexes.js
# - jstests/core/clustered/clustered_collection_creation.js
# - jstests/core/ddl/create_indexes.js
# - jstests/core/index/index_id_options.js
# - jstests/core/index/index9.js
# - jstests/core/txns/no_writes_to_system_collections_in_txn.js
# - jstests/core/sbe_plan_cache_duplicate_or_clauses.js
# - jstests/core/startup_log.js
# # TODO SERVER-79996: fix issues found by the following tests.
# - jstests/core/query/explain/explain_agg_write_concern.js
# - jstests/core/views/views_distinct.js
# - jstests/core/views/views_distinct_with_arrays.js
# - jstests/core/timeseries/bucket_unpacking_group_reorder_fixed_buckets.js
# - jstests/core/dbadmin.js
# - jstests/core/catalog/list_catalog.js
# - jstests/core/ddl/dropdb.js
# - jstests/core/dbcase.js
# - jstests/core/query/query_settings/query_settings_cmds.js
# - jstests/core/views/views_count.js
# - jstests/core/query/agg_hint.js
# - jstests/core/timeseries/timeseries_delete_hint.js
# - jstests/core/timeseries/timeseries_out_non_sharded.js
# - jstests/core/views/views_collation.js
# - jstests/core/queryable_encryption/basic_crud.js
# - jstests/core/timeseries/timeseries_update_hint.js

executor:
archive:
tests: true
hooks:
- CheckReplDBHash
- CheckReplOplogs
- ValidateCollections
config:
shell_options:
eval: |
globalThis.testingReplication = true;
await import("jstests/libs/override_methods/simulate_atlas_proxy.js");
global_vars:
TestData: &TestData
tenantId: "636d957b2646ddfaf9b5e13f"
hooks:
- class: CheckReplOplogs
- class: CheckReplDBHash
- class: ValidateCollections
- class: CleanEveryN
n: 20
fixture:
class: ReplicaSetFixture
num_nodes: 2
mongod_options:
set_parameters:
enableTestCommands: 1
multitenancySupport: true
logComponentVerbosity:
command: 2
noscripting: ''
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ selector:
roots:
- jstests/core/**/*.js
exclude_with_any_tags:
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible
# Exclude tests which use commands that aren't supported in Serverless.
- command_not_supported_in_serverless
# Theses tests expect replication is not enabled.
- assumes_standalone_mongod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ selector:
roots:
- jstests/core/**/*.js
exclude_with_any_tags:
# All allowed commands are list in inject_security_token.js override. Any commands out of the list are disallowed.
- not_allowed_with_security_token
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible
# Exclude tests which use commands that aren't supported in Serverless.
- command_not_supported_in_serverless
# Exclude tests which we know use commands that don't support a security token.
- not_allowed_with_security_token
# Theses tests expect replication is not enabled.
- assumes_standalone_mongod
# capped collections are banned in Serverless.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ selector:
- requires_timeseries # Tenant migration, transactions not supported
- requires_fastcount
- multiple_tenants_incompatible
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ selector:
- requires_timeseries # Tenant migration not supported
- requires_fastcount
- multiple_tenants_incompatible
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ selector:
- requires_timeseries # Tenant migration, transactions not supported
- requires_fastcount
- multiple_tenants_incompatible
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ selector:
- tenant_migration_incompatible
- multiple_tenants_incompatible
- requires_timeseries # Tenant migration not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ selector:
- tenant_migration_incompatible
- multiple_tenants_incompatible
- requires_timeseries # Tenant migration not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ selector:
- uses_full_validation
- multiple_tenants_incompatible
- requires_timeseries # Tenant migration not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ selector:
- requires_multi_updates
- multiple_tenants_incompatible
- requires_timeseries # Tenant migration, transactions not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ selector:
- uses_full_validation
- multiple_tenants_incompatible
- requires_timeseries # Tenant migration not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ selector:
- uses_full_validation
- multiple_tenants_incompatible
- requires_timeseries # Tenant migration not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ selector:
# Parallel shell is not causally consistent because it uses a different session.
- uses_parallel_shell
- requires_timeseries # Tenant migration not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ selector:
- uses_full_validation
- tenant_migration_incompatible
- requires_timeseries # Tenant migration not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ selector:
# process.
- uses_full_validation
- requires_timeseries # Tenant migration not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ selector:
# Multi-updates that conflict with tenant migration are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
- requires_timeseries # Tenant migration, transactions not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ selector:
- uses_full_validation
- uses_transactions
- requires_timeseries # Tenant migration not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible

executor:
archive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ selector:
- uses_full_validation
- uses_transactions
- requires_timeseries # Tenant migration not supported
# This passthrough uses the `simulate_atlas_proxy` override, which some tests are incompatible with.
- simulate_atlas_proxy_incompatible


executor:
archive:
Expand Down
8 changes: 8 additions & 0 deletions etc/evergreen_yml_components/definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6288,6 +6288,14 @@ tasks:
vars:
use_large_distro: "true"

- <<: *gen_task_template
name: multitenancy_jscore_passthrough_gen
tags: ["serverless"]
commands:
- func: "generate resmoke tasks"
vars:
use_large_distro: "true"

- <<: *gen_task_template
name: clustered_collection_passthrough_gen
tags: ["large", "clustered_collections"]
Expand Down
2 changes: 1 addition & 1 deletion jstests/core/SERVER-23626.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @tags: [
// # This test does not support tojson of command objects so the simulate_atlas_proxy.js override
// # cannot deep copy the command objects correctly.
// tenant_migration_incompatible,
// simulate_atlas_proxy_incompatible,
// ]

var t = db.jstests_server23626;
Expand Down
4 changes: 2 additions & 2 deletions jstests/core/administrative/apply_ops/apply_ops1.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* The test runs commands that are not allowed with security token: applyOps.
* @tags: [
* # The test runs commands that are not allowed with security token: applyOps.
* not_allowed_with_security_token,
* assumes_superuser_permissions,
* requires_fastcount,
Expand Down Expand Up @@ -519,4 +519,4 @@ assert.commandWorked(db.adminCommand({
}),
"Nested apply ops was NOT successful");
assert.eq(t.findOne({_id: 13}), {_id: 13, x: 'nested apply op update1'});
assert.eq(t.findOne({_id: 14}), {_id: 14, x: 'nested apply op update2'});
assert.eq(t.findOne({_id: 14}), {_id: 14, x: 'nested apply op update2'});
2 changes: 1 addition & 1 deletion jstests/core/administrative/apply_ops/apply_ops2.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* Test applyops upsert flag SERVER-7452
*
* The test runs commands that are not allowed with security token: applyOps.
* @tags: [
* # The test runs commands that are not allowed with security token: applyOps.
* not_allowed_with_security_token,
* requires_non_retryable_commands,
* requires_fastcount,
Expand Down
4 changes: 2 additions & 2 deletions jstests/core/administrative/apply_ops/apply_ops_dups.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* The test runs commands that are not allowed with security token: applyOps.
* @tags: [
* # The test runs commands that are not allowed with security token: applyOps.
* not_allowed_with_security_token,
* requires_non_retryable_commands,
* requires_fastcount,
Expand Down Expand Up @@ -54,4 +54,4 @@ var a = assert.commandFailedWithCode(db.adminCommand({
ErrorCodes.DuplicateKey);
// We do not applyOps atomically, so the first op is applied and the second is not. The total number
// is now 2.
assert.eq(2, t.find().count(), "Expected 2 documents after applyOps");
assert.eq(2, t.find().count(), "Expected 2 documents after applyOps");
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Indexes created through applyOps should be built exactly according to their index spec, without
* inheriting the collection default collation, since this is how the oplog entries are replicated.
*
* The test runs commands that are not allowed with security token: applyOps.
* @tags: [
* # The test runs commands that are not allowed with security token: applyOps.
* not_allowed_with_security_token,
* # Cannot implicitly shard accessed collections because of
* # collection existing when none expected.
Expand Down Expand Up @@ -58,4 +58,4 @@ let res = db.adminCommand({

// It is not possible to test createIndexes in applyOps because that command is not accepted by
// applyOps in that mode.
assert.commandFailedWithCode(res, ErrorCodes.CommandNotSupported);
assert.commandFailedWithCode(res, ErrorCodes.CommandNotSupported);
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*
* The original motivation for this test is MongoMirror.
*
* The test runs commands that are not allowed with security token: applyOps.
* @tags: [
* # The test runs commands that are not allowed with security token: applyOps.
* not_allowed_with_security_token,
* requires_non_retryable_commands,
* # applyOps is not supported on mongos
Expand Down Expand Up @@ -64,4 +64,4 @@ applyOps([{
o2: {_id: 1},
o: {$v: 2, diff: {u: {b: 2}, sa: {u: {field: 2}}}}
}]);
assert.eq({_id: 1, a: null, b: 2}, coll.findOne());
assert.eq({_id: 1, a: null, b: 2}, coll.findOne());
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Tests that applyOps can include operations on the system.views namespace.
* The test runs commands that are not allowed with security token: applyOps.
*
* @tags: [
* # The test runs commands that are not allowed with security token: applyOps.
* not_allowed_with_security_token,
* # applyOps is not supported on mongos
* assumes_against_mongod_not_mongos,
Expand Down Expand Up @@ -40,4 +41,4 @@ const ops = [{
}];

assert.commandWorked(db.adminCommand({applyOps: ops}));
assert.eq(view.find({}, {_id: 0, a: 1}).toArray(), [{a: 0}]);
assert.eq(view.find({}, {_id: 0, a: 1}).toArray(), [{a: 0}]);
4 changes: 2 additions & 2 deletions jstests/core/administrative/apply_ops/apply_ops_without_ns.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* The test runs commands that are not allowed with security token: applyOps.
* @tags: [
* # The test runs commands that are not allowed with security token: applyOps.
* not_allowed_with_security_token,
* requires_non_retryable_commands,
* # applyOps is not supported on mongos
Expand All @@ -14,4 +14,4 @@

// SERVER-33854: This should fail and not cause any invalid memory access.
assert.commandFailed(db.adminCommand(
{applyOps: [{'op': 'c', 'ns': 'admin.$cmd', 'o': {applyOps: [{'op': 'i', 'o': {x: 1}}]}}]}));
{applyOps: [{'op': 'c', 'ns': 'admin.$cmd', 'o': {applyOps: [{'op': 'i', 'o': {x: 1}}]}}]}));
4 changes: 2 additions & 2 deletions jstests/core/administrative/auth1.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The test runs commands that are not allowed with security token: authenticate, createUser,
// dropUser, logout.
// @tags: [
// # The test runs commands that are not allowed with security token: authenticate, createUser,
// # dropUser, logout.
// not_allowed_with_security_token,
// assumes_superuser_permissions,
// assumes_write_concern_unchanged,
Expand Down
Loading

0 comments on commit 0893121

Please sign in to comment.