Skip to content

Commit

Permalink
Remove directConnection=true everywhere (#752)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi committed Jan 29, 2024
1 parent dafd423 commit 500d63d
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Taskfile.yaml
Expand Up @@ -104,7 +104,7 @@ tasks:
desc: "Run mongo shell"
cmds:
- >
docker compose run --rm mongosh mongosh
docker compose run --rm mongosh mongosh
'mongodb://host.docker.internal:27017/'
--eval 'disableTelemetry()' --shell
Expand All @@ -113,7 +113,7 @@ tasks:
cmds:
- >
docker compose run --rm mongosh mongosh
'mongodb://host.docker.internal:27017/?directConnection=true'
'mongodb://host.docker.internal:27017/'
--verbose --eval 'rs.initiate({_id: "rs0", members: [{_id: 0, host: "localhost"}]})'
# ignore already initialized error and no such command error for replSetInitiate
ignore_error: true
Expand All @@ -125,7 +125,7 @@ tasks:
cmds:
- >
docker compose run --rm mongosh mongosh
'mongodb://host.docker.internal:27017/?directConnection=true'
'mongodb://host.docker.internal:27017/'
--verbose --eval 'db.getSiblingDB("admin").createUser({user: "user", pwd: "password", roles: [ "root" ]})'
# ignore roles that are not implemented yet
ignore_error: true
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Expand Up @@ -98,7 +98,7 @@ services:
working_dir: /tests/mongo
volumes:
- ./tests/mongo:/tests/mongo

# for documentation
textlint:
build:
Expand Down
2 changes: 1 addition & 1 deletion tests/dotnet-example-auth-scram-sha-1.yml
Expand Up @@ -4,7 +4,7 @@ dir: dotnet-example
args:
- dotnet
- run
- mongodb://user:password@localhost:27017/?replicaSet=rs0&directConnection=true&authMechanism=SCRAM-SHA-1
- mongodb://user:password@localhost:27017/?replicaSet=rs0&authMechanism=SCRAM-SHA-1

results:
postgresql:
Expand Down
2 changes: 1 addition & 1 deletion tests/dotnet-example-auth-scram-sha-256.yml
Expand Up @@ -4,7 +4,7 @@ dir: dotnet-example
args:
- dotnet
- run
- mongodb://user:password@localhost:27017/?replicaSet=rs0&directConnection=true&authMechanism=SCRAM-SHA-256
- mongodb://user:password@localhost:27017/?replicaSet=rs0&authMechanism=SCRAM-SHA-256

results:
postgresql:
Expand Down
2 changes: 1 addition & 1 deletion tests/java-example-auth-scram-sha-1.sh
Expand Up @@ -6,4 +6,4 @@ set -ex
export MAVEN_OPTS='-ea'

mvn compile exec:java -Dexec.mainClass=com.start.Connection \
-Dexec.args="mongodb://user:password@localhost:27017/?replicaSet=rs0&directConnection=true&authMechanism=SCRAM-SHA-1"
-Dexec.args="mongodb://user:password@localhost:27017/?replicaSet=rs0&authMechanism=SCRAM-SHA-1"
2 changes: 1 addition & 1 deletion tests/java-example-auth-scram-sha-256.sh
Expand Up @@ -6,4 +6,4 @@ set -ex
export MAVEN_OPTS='-ea'

mvn compile exec:java -Dexec.mainClass=com.start.Connection \
-Dexec.args="mongodb://user:password@localhost:27017/?replicaSet=rs0&directConnection=true&authMechanism=SCRAM-SHA-256"
-Dexec.args="mongodb://user:password@localhost:27017/?replicaSet=rs0&authMechanism=SCRAM-SHA-256"
2 changes: 1 addition & 1 deletion tests/meteor-doc-fetcher.sh
Expand Up @@ -8,6 +8,6 @@ export METEOR_LOCAL_DIR=~/.meteor

export MONGO_URL="mongodb://localhost:27017/"

export MONGO_OPLOG_URL="mongodb://localhost:27017/local?replicaSet=rs0&directConnection=true"
export MONGO_OPLOG_URL="mongodb://localhost:27017/local?replicaSet=rs0"

TINYTEST_FILTER="mongo-livedata - doc fetcher" ./packages/test-in-console/run.sh --once
2 changes: 1 addition & 1 deletion tests/meteor-oplog-cursor-supported.sh
Expand Up @@ -8,6 +8,6 @@ export METEOR_LOCAL_DIR=~/.meteor

export MONGO_URL="mongodb://localhost:27017/"

export MONGO_OPLOG_URL="mongodb://localhost:27017/local?replicaSet=rs0&directConnection=true"
export MONGO_OPLOG_URL="mongodb://localhost:27017/local?replicaSet=rs0"

TINYTEST_FILTER="mongo-livedata - oplog - cursorSupported" ./packages/test-in-console/run.sh --once
2 changes: 1 addition & 1 deletion tests/meteor-oplog-entry-skipping.sh
Expand Up @@ -8,6 +8,6 @@ export METEOR_LOCAL_DIR=~/.meteor

export MONGO_URL="mongodb://localhost:27017/"

export MONGO_OPLOG_URL="mongodb://localhost:27017/local?replicaSet=rs0&directConnection=true"
export MONGO_OPLOG_URL="mongodb://localhost:27017/local?replicaSet=rs0"

TINYTEST_FILTER="mongo-livedata - oplog - entry skipping" ./packages/test-in-console/run.sh --once
2 changes: 1 addition & 1 deletion tests/meteor-oplog-x-implicit-collection-creation.sh
Expand Up @@ -8,6 +8,6 @@ export METEOR_LOCAL_DIR=~/.meteor

export MONGO_URL="mongodb://localhost:27017/"

export MONGO_OPLOG_URL="mongodb://localhost:27017/local?replicaSet=rs0&directConnection=true"
export MONGO_OPLOG_URL="mongodb://localhost:27017/local?replicaSet=rs0"

TINYTEST_FILTER="mongo-livedata - oplog - x - implicit collection creation" ./packages/test-in-console/run.sh --once
2 changes: 1 addition & 1 deletion tests/python-example-auth-scram-sha-1.sh
Expand Up @@ -4,4 +4,4 @@ set -ex

pip3 install pymongo

python3 pymongo_test.py 'mongodb://user:password@localhost:27017/?replicaSet=rs0&directConnection=true&authMechanism=SCRAM-SHA-1'
python3 pymongo_test.py 'mongodb://user:password@localhost:27017/?replicaSet=rs0&authMechanism=SCRAM-SHA-1'
2 changes: 1 addition & 1 deletion tests/python-example-auth-scram-sha-256.sh
Expand Up @@ -4,4 +4,4 @@ set -ex

pip3 install pymongo

python3 pymongo_test.py 'mongodb://user:password@localhost:27017/?replicaSet=rs0&directConnection=true&authMechanism=SCRAM-SHA-256'
python3 pymongo_test.py 'mongodb://user:password@localhost:27017/?replicaSet=rs0&authMechanism=SCRAM-SHA-256'

0 comments on commit 500d63d

Please sign in to comment.