File tree Expand file tree Collapse file tree 5 files changed +12
-10
lines changed
Expand file tree Collapse file tree 5 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 22
33echo Loading MO for $DEPLOYMENT
44
5+ if [[ -z $TRAVIS_BUILD_DIR ]]; then
6+ TRAVIS_BUILD_DIR=` pwd` ;
7+ fi
8+
59case $DEPLOYMENT in
610 SHARDED_CLUSTER)
711 ${TRAVIS_BUILD_DIR} /.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR} /scripts/presets/travis/sharded_clusters/cluster.json start > /tmp/mo-result.json
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ Connect to MongoDB with using default auth mechanism
33--SKIPIF--
44<?php require __DIR__ . "/../utils/basic-skipif.inc " ; ?>
55<?php skip_if_not_auth (); ?>
6+ <?php skip_if_not_auth_mechanism (null ); ?>
67<?php skip_if_not_clean (); ?>
78--FILE--
89<?php
Original file line number Diff line number Diff line change 11--TEST--
2- Connect to MongoDB with using default auth mechanism #002
3- --XFAIL--
4- parse_url() tests must be reimplemented (PHPC-1177)
2+ Connect to MongoDB with using default auth mechanism and wrong password
53--SKIPIF--
64<?php require __DIR__ . "/../utils/basic-skipif.inc " ; ?>
75<?php skip_if_not_auth (); ?>
6+ <?php skip_if_not_auth_mechanism (null ); ?>
87<?php skip_if_not_clean (); ?>
98--FILE--
109<?php
1110require_once __DIR__ . "/../utils/basic.inc " ;
1211
1312$ username = "root " ;
14- $ password = "tooring " ;
13+ $ password = "the-wrong-password " ;
1514$ database = "admin " ;
1615
1716$ parsed = parse_url (URI );
Original file line number Diff line number Diff line change @@ -24,11 +24,9 @@ foreach ($writeConcerns as $wc) {
2424 var_dump ($ result ->getInsertedCount ());
2525}
2626
27- $ command = new MongoDB \Driver \Command ([
28- 'delete ' => COLLECTION_NAME ,
29- 'deletes ' => [ [ 'q ' => (object ) [], 'limit ' => 0 ] ]
30- ]);
31- $ server ->executeCommand ('local ' , $ command );
27+ $ bulk = new MongoDB \Driver \BulkWrite ();
28+ $ bulk ->delete ( (object ) [] );
29+ $ server ->executeBulkWrite ('local. ' . COLLECTION_NAME , $ bulk );
3230
3331?>
3432===DONE===
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ function skip_if_not_auth_mechanism($authMechanism)
9797{
9898 $ uriAuthMechanism = get_uri_option (URI , 'authMechanism ' );
9999
100- if ($ uriAuthMechanism === null ) {
100+ if ($ uriAuthMechanism === null && $ authMechanism !== null ) {
101101 exit ('skip URI is not using authMechanism ' );
102102 }
103103
You can’t perform that action at this time.
0 commit comments