SERVER-29629 Add causally consistent passthrough with auth
This commit is contained in:
parent
355e451693
commit
bbf93be45d
@ -4,6 +4,9 @@ selector:
|
||||
roots:
|
||||
- jstests/core/**/*.js
|
||||
exclude_files:
|
||||
# TODO SERVER-29700: findAndModify returns an operationTime prior to when its write took place.
|
||||
- jstests/core/find_and_modify_*.js
|
||||
- jstests/core/update_find_and_modify_id.js
|
||||
# The following tests fail because a certain command or functionality is not supported on
|
||||
# mongos. This command or functionality is placed in a comment next to the failing test.
|
||||
- jstests/core/apitest_db.js # profiling.
|
||||
|
||||
@ -0,0 +1,212 @@
|
||||
config_variables:
|
||||
- &keyFile jstests/libs/authTestsKey
|
||||
- &keyFileData Thiskeyisonlyforrunningthesuitewithauthenticationdontuseitinanytestsdirectly
|
||||
- &authOptions
|
||||
authenticationDatabase: admin
|
||||
authenticationMechanism: SCRAM-SHA-1
|
||||
password: *keyFileData
|
||||
username: __system
|
||||
|
||||
test_kind: js_test
|
||||
|
||||
selector:
|
||||
roots:
|
||||
- jstests/core/**/*.js
|
||||
exclude_files:
|
||||
# Skip any tests that run with auth explicitly.
|
||||
- jstests/core/*[aA]uth*.js
|
||||
# Skip any tests that require privileges for non test databases.
|
||||
- jstests/core/copydatabase_no_id_index.js
|
||||
- jstests/core/copydb.js
|
||||
- jstests/core/system_profile.js
|
||||
# TODO SERVER-29700: findAndModify returns an operationTime prior to when its write took place.
|
||||
- jstests/core/find_and_modify_*.js
|
||||
- jstests/core/update_find_and_modify_id.js
|
||||
# The following tests fail because a certain command or functionality is not supported on
|
||||
# mongos. This command or functionality is placed in a comment next to the failing test.
|
||||
- jstests/core/apitest_db.js # profiling.
|
||||
- jstests/core/apply_ops*.js # applyOps, SERVER-1439.
|
||||
- jstests/core/capped6.js # captrunc.
|
||||
- jstests/core/capped_convertToCapped1.js # cloneCollectionAsCapped.
|
||||
- jstests/core/capped_empty.js # emptycapped.
|
||||
- jstests/core/capped_update.js # uses godinsert and can't run under replication.
|
||||
- jstests/core/check_shard_index.js # checkShardingIndex.
|
||||
- jstests/core/collection_truncate.js # emptycapped.
|
||||
- jstests/core/compact_keeps_indexes.js # compact.
|
||||
- jstests/core/currentop.js # uses fsync.
|
||||
- jstests/core/dbadmin.js # "local" database.
|
||||
- jstests/core/dbhash.js # dbhash.
|
||||
- jstests/core/dbhash2.js # dbhash.
|
||||
- jstests/core/diagdata.js # Command not supported in mongos
|
||||
- jstests/core/dropdb_race.js # syncdelay.
|
||||
- jstests/core/evalb.js # db.eval() and profiling.
|
||||
- jstests/core/fsync.js # uses fsync.
|
||||
- jstests/core/geo_haystack*.js # geoSearch.
|
||||
- jstests/core/geo_s2cursorlimitskip.js # db.eval() and profiling.
|
||||
- jstests/core/geo_update_btree2.js # notablescan.
|
||||
- jstests/core/index_bigkeys_nofail.js # failIndexKeyTooLong.
|
||||
- jstests/core/index_bigkeys_validation.js # failIndexKeyTooLong.
|
||||
- jstests/core/max_time_ms.js # sleep, SERVER-2212.
|
||||
- jstests/core/notablescan.js # notablescan.
|
||||
- jstests/core/profile*.js # profiling.
|
||||
- jstests/core/repair_database.js # repairDatabase
|
||||
- jstests/core/repair_database_input_validation.js # repairDatabase
|
||||
- jstests/core/repair_server12955.js # repairDatabase
|
||||
- jstests/core/stages*.js # stageDebug.
|
||||
- jstests/core/startup_log.js # "local" database.
|
||||
- jstests/core/storageDetailsCommand.js # diskStorageStats.
|
||||
- jstests/core/top.js # top.
|
||||
# The following tests fail because mongos behaves differently from mongod when testing certain
|
||||
# functionality. The differences are in a comment next to the failing test.
|
||||
- jstests/core/explain_missing_database.js # Behavior with no db different on mongos.
|
||||
- jstests/core/geo_2d_explain.js # executionSuccess in different spot in explain().
|
||||
- jstests/core/geo_s2explain.js # inputStage in different spot in explain().
|
||||
- jstests/core/geo_s2sparse.js # keysPerIndex in different spot in validate().
|
||||
- jstests/core/operation_latency_histogram.js # Stats are counted differently on mongos, SERVER-24880.
|
||||
# TODO: SERVER-18292 remove once OP_COMMAND is implemented in mongos.
|
||||
- jstests/core/invalid_db_name.js
|
||||
- jstests/core/validate_cmd_ns.js
|
||||
- jstests/core/views/invalid_system_views.js # We expect listCollections to fail when there's an invalid view.
|
||||
# TODO: SERVER-27269: mongos can't establish cursor if view has $collStats and views another view.
|
||||
- jstests/core/views/views_coll_stats.js
|
||||
- jstests/core/killop_drop_collection.js # Uses fsyncLock.
|
||||
# Tests that won't work with an injected 'majority' readConcern
|
||||
# and/or an injected 'majority' writeConcern. Where a function is
|
||||
# listed the reason is we don't have a reliable solution to override
|
||||
# the write concern for that function.
|
||||
- jstests/core/batch_write_command*.js # these tests use various write concerns
|
||||
- jstests/core/bench_test*.js # benchRun() used for writes
|
||||
- jstests/core/crud_api.js # has specific w:0 tests
|
||||
- jstests/core/error2.js # db.eval() used
|
||||
- jstests/core/eval0.js # db.eval() used
|
||||
- jstests/core/eval1.js # db.eval() used
|
||||
- jstests/core/eval3.js # db.eval() used
|
||||
- jstests/core/eval4.js # db.eval() used
|
||||
- jstests/core/eval5.js # db.eval() used
|
||||
- jstests/core/eval6.js # db.eval() used
|
||||
- jstests/core/eval7.js # db.eval() used
|
||||
- jstests/core/eval9.js # db.eval() used
|
||||
- jstests/core/evala.js # db.eval() used
|
||||
- jstests/core/evalc.js # db.eval() used
|
||||
- jstests/core/evald.js # db.eval() used
|
||||
- jstests/core/evale.js # db.eval() used
|
||||
- jstests/core/evalg.js # db.eval() used
|
||||
- jstests/core/eval_mr.js # db.eval() used
|
||||
- jstests/core/eval_nolock.js # db.eval() used
|
||||
- jstests/core/js3.js # db.dbEval() used
|
||||
- jstests/core/js7.js # db.eval() used
|
||||
- jstests/core/js9.js # db.eval() used
|
||||
- jstests/core/mr_merge.js # mr temp tables aren't replicated
|
||||
- jstests/core/mr_merge2.js # mr temp tables aren't replicated
|
||||
- jstests/core/mr_outreduce.js # mr temp tables aren't replicated
|
||||
- jstests/core/mr_outreduce2.js # mr temp tables aren't replicated
|
||||
- jstests/core/opcounters_active.js # off by n problem with opcounters
|
||||
- jstests/core/opcounters_write_cmd.js # off by n problem with opcounters
|
||||
- jstests/core/read_after_optime.js # verifies read after optime fails on standalone
|
||||
- jstests/core/remove8.js # db.eval() used
|
||||
- jstests/core/rename4.js # db.eval() used
|
||||
- jstests/core/shell1.js # tests setSlaveOk() variations on standalone mongod
|
||||
- jstests/core/shellkillop.js # db.eval() used
|
||||
- jstests/core/shell_writeconcern.js # checks write concern shell helpers
|
||||
- jstests/core/storefunc.js # db.eval() used
|
||||
- jstests/core/write_result.js # Tests invalid writeConcern, we shouldn't override.
|
||||
# Tests that need triaging & remediation | blacklist decision
|
||||
# Comments list possible problem point under review.
|
||||
- jstests/core/stages_delete.js # Uses stageDebug command for deletes.
|
||||
# Tests that fail for Causal Consistency as they have statements that do not support
|
||||
# non-local read concern.
|
||||
- jstests/core/geo_mapreduce.js
|
||||
- jstests/core/geo_mapreduce2.js
|
||||
- jstests/core/geo_big_polygon3.js
|
||||
- jstests/core/mr*.js
|
||||
- jstests/core/profile_mapreduce.js
|
||||
- jstests/core/collation.js
|
||||
- jstests/core/loadserverscripts.js
|
||||
- jstests/core/bypass_doc_validation.js
|
||||
- jstests/core/capped_max1.js
|
||||
- jstests/core/commands_namespace_parsing.js
|
||||
- jstests/core/tailable_skip_limit.js
|
||||
- jstests/core/constructors.js
|
||||
- jstests/core/index_stats.js
|
||||
- jstests/core/views/views_all_commands.js
|
||||
- jstests/core/or4.js
|
||||
- jstests/core/recursion.js
|
||||
- jstests/core/temp_cleanup.js
|
||||
|
||||
executor:
|
||||
config:
|
||||
shell_options:
|
||||
global_vars:
|
||||
TestData:
|
||||
auth: true
|
||||
authMechanism: SCRAM-SHA-1
|
||||
keyFile: *keyFile
|
||||
keyFileData: *keyFileData
|
||||
eval: |
|
||||
jsTest.authenticate(db.getMongo());
|
||||
(function() {
|
||||
const username = "misha";
|
||||
const password = "pwd";
|
||||
|
||||
const res = db.runCommand({
|
||||
createUser: username,
|
||||
pwd: password,
|
||||
roles: ["dbOwner"],
|
||||
});
|
||||
|
||||
if (res.ok === 1) {
|
||||
assert.commandWorked(res);
|
||||
} else {
|
||||
// If 'username' already exists, then attempts to create a user with the same name
|
||||
// will fail with a duplicate key error.
|
||||
assert.commandFailedWithCode(res, ErrorCodes.DuplicateKey);
|
||||
}
|
||||
|
||||
db.logout();
|
||||
db.auth(username, password);
|
||||
})();
|
||||
load("jstests/libs/override_methods/enable_causal_consistency.js");
|
||||
<<: *authOptions
|
||||
readMode: commands
|
||||
hooks:
|
||||
- class: ValidateCollections
|
||||
shell_options: *authOptions
|
||||
- class: CleanEveryN
|
||||
n: 20
|
||||
fixture:
|
||||
class: ShardedClusterFixture
|
||||
mongos_options:
|
||||
bind_ip_all: ''
|
||||
keyFile: *keyFile
|
||||
set_parameters:
|
||||
enableTestCommands: 1
|
||||
logComponentVerbosity:
|
||||
verbosity: 0
|
||||
command: 1
|
||||
network:
|
||||
verbosity: 1
|
||||
asio: 2
|
||||
tracking: 0
|
||||
mongod_options:
|
||||
bind_ip_all: ''
|
||||
nopreallocj: ''
|
||||
enableMajorityReadConcern: ''
|
||||
auth: ''
|
||||
keyFile: *keyFile
|
||||
set_parameters:
|
||||
enableTestCommands: 1
|
||||
enableLocalhostAuthBypass: false
|
||||
logComponentVerbosity:
|
||||
verbosity: 0
|
||||
command: 1
|
||||
network:
|
||||
verbosity: 1
|
||||
asio: 2
|
||||
replication:
|
||||
heartbeats: 2
|
||||
tracking: 0
|
||||
numInitialSyncAttempts: 1
|
||||
num_rs_nodes_per_shard: 2
|
||||
enable_sharding:
|
||||
- test
|
||||
auth_options: *authOptions
|
||||
@ -3166,6 +3166,17 @@ tasks:
|
||||
resmoke_args: --suites=causally_consistent_jscore_passthrough --storageEngine=wiredTiger
|
||||
run_multiple_jobs: true
|
||||
|
||||
- <<: *task_template
|
||||
name: causally_consistent_jscore_passthrough_auth_WT
|
||||
depends_on:
|
||||
- name: jsCore_WT
|
||||
commands:
|
||||
- func: "do setup"
|
||||
- func: "run tests"
|
||||
vars:
|
||||
resmoke_args: --suites=causally_consistent_jscore_passthrough_auth --storageEngine=wiredTiger
|
||||
run_multiple_jobs: true
|
||||
|
||||
- name: idl_tests
|
||||
depends_on:
|
||||
- name: compile
|
||||
@ -5077,6 +5088,7 @@ buildvariants:
|
||||
- name: auth
|
||||
- name: auth_WT
|
||||
- name: causally_consistent_jscore_passthrough_WT
|
||||
- name: causally_consistent_jscore_passthrough_auth_WT
|
||||
- name: dbtest
|
||||
- name: dbtest_WT
|
||||
- name: disk
|
||||
@ -5509,6 +5521,7 @@ buildvariants:
|
||||
- name: bulk_gle_passthrough
|
||||
- name: bulk_gle_passthrough_WT
|
||||
- name: causally_consistent_jscore_passthrough_WT
|
||||
- name: causally_consistent_jscore_passthrough_auth_WT
|
||||
- name: concurrency
|
||||
- name: concurrency_WT
|
||||
- name: concurrency_replication
|
||||
@ -5742,6 +5755,7 @@ buildvariants:
|
||||
- name: bulk_gle_passthrough
|
||||
- name: bulk_gle_passthrough_WT
|
||||
- name: causally_consistent_jscore_passthrough_WT
|
||||
- name: causally_consistent_jscore_passthrough_auth_WT
|
||||
- name: concurrency
|
||||
- name: concurrency_WT
|
||||
- name: concurrency_replication
|
||||
@ -8076,6 +8090,7 @@ buildvariants:
|
||||
- name: auth_audit
|
||||
- name: bulk_gle_passthrough
|
||||
- name: causally_consistent_jscore_passthrough_WT
|
||||
- name: causally_consistent_jscore_passthrough_auth_WT
|
||||
- name: concurrency
|
||||
distros:
|
||||
- rhel62-large # Some workloads require a lot of memory, use a bigger machine for this suite.
|
||||
@ -8495,6 +8510,7 @@ buildvariants:
|
||||
- name: bulk_gle_passthrough
|
||||
- name: bulk_gle_passthrough_WT
|
||||
- name: causally_consistent_jscore_passthrough_WT
|
||||
- name: causally_consistent_jscore_passthrough_auth_WT
|
||||
- name: concurrency
|
||||
- name: concurrency_WT
|
||||
- name: concurrency_replication
|
||||
@ -8671,6 +8687,7 @@ buildvariants:
|
||||
- name: bulk_gle_passthrough
|
||||
- name: bulk_gle_passthrough_WT
|
||||
- name: causally_consistent_jscore_passthrough_WT
|
||||
- name: causally_consistent_jscore_passthrough_auth_WT
|
||||
- name: concurrency
|
||||
- name: concurrency_WT
|
||||
- name: concurrency_replication
|
||||
|
||||
Loading…
Reference in New Issue
Block a user