[SERVER-20478] resmoke.py can't pass auth/*.js Created: 18/Sep/15  Updated: 21/Sep/15  Resolved: 18/Sep/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.0.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: YANG Chenghu Assignee: Max Hirschhorn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-20527 Delete resmoke.py from the 3.0 branch Closed
Operating System: ALL
Steps To Reproduce:

python2.7 ./buildscripts/resmoke.py --auth=AUTH \
 --set "executor.fixtures.mongodb_server.mongod_options.setParameter" "enableTestCommands=1" \
 --set "executor.fixtures.mongodb_server.mongod_options.dbpath" "`echo $HOME`/smokedata/db/mypath" \
 ./jstests/auth/auth1.js

Log:

Authenticating as internal __system user with mechanism SCRAM-SHA-1 on connection: connection to 127.0.0.1:31000
m31000| 2015-09-17T20:34:12.830+0800 I ACCESS   [conn1] SCRAM-SHA-1 authentication failed for __system on local from client 127.0.0.1 ; AuthenticationFai    led It is not possible to authenticate as the __system user on servers started without a --keyFile parameter
Error: 18 Authentication failed.

Sprint: Quint 9 09/18/15
Participants:

 Description   

Run resmoke.py can't pass auth/*.js js case.

maybe missing --keyFile parameter.



 Comments   
Comment by Max Hirschhorn [ 18/Sep/15 ]

It looks like you are trying to run resmoke.py on the 3.0 branch; the only supported test runner to use for the 3.0 branch is smoke.py. Significant modifications have been made to resmoke.py during the 3.1.x development cycle.

Additionally, running tests from the jstests/auth/ directory is incompatible with the --auth option. The former is verifying auth-specific behavior where tests will start their own mongod process under different configurations, and the latter is designed to run the tests in the jstests/core/ directory against a mongod process with authentication enabled (one of our so-called passthrough suites).

smoke.py quietly enforces this by skipping tests with the string "auth" in their path when the --auth command line option is specified:

if auth or keyFile or use_x509: # For tests running with auth
    # Skip any tests that run with auth explicitly
    if parentDir.lower() == "auth" or "auth" in basename.lower():
        return True

$ python buildscripts/smoke.py --auth jstests/auth/auth1.js
...
0 tests succeeded
1 tests didn't get run

If you have more questions regarding smoke.py or resmoke.py, then I suggest you post on the mongodb-dev google group to benefit other developers who might be interested.

Hope that helps,
Max

Generated at Thu Feb 08 03:54:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.