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 2
2
3
3
echo Loading MO for $DEPLOYMENT
4
4
5
+ if [[ -z $TRAVIS_BUILD_DIR ]]; then
6
+ TRAVIS_BUILD_DIR=` pwd` ;
7
+ fi
8
+
5
9
case $DEPLOYMENT in
6
10
SHARDED_CLUSTER)
7
11
${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
3
3
--SKIPIF--
4
4
<?php require __DIR__ . "/../utils/basic-skipif.inc " ; ?>
5
5
<?php skip_if_not_auth (); ?>
6
+ <?php skip_if_not_auth_mechanism (null ); ?>
6
7
<?php skip_if_not_clean (); ?>
7
8
--FILE--
8
9
<?php
Original file line number Diff line number Diff line change 1
1
--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
5
3
--SKIPIF--
6
4
<?php require __DIR__ . "/../utils/basic-skipif.inc " ; ?>
7
5
<?php skip_if_not_auth (); ?>
6
+ <?php skip_if_not_auth_mechanism (null ); ?>
8
7
<?php skip_if_not_clean (); ?>
9
8
--FILE--
10
9
<?php
11
10
require_once __DIR__ . "/../utils/basic.inc " ;
12
11
13
12
$ username = "root " ;
14
- $ password = "tooring " ;
13
+ $ password = "the-wrong-password " ;
15
14
$ database = "admin " ;
16
15
17
16
$ parsed = parse_url (URI );
Original file line number Diff line number Diff line change @@ -24,11 +24,9 @@ foreach ($writeConcerns as $wc) {
24
24
var_dump ($ result ->getInsertedCount ());
25
25
}
26
26
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 );
32
30
33
31
?>
34
32
===DONE===
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ function skip_if_not_auth_mechanism($authMechanism)
97
97
{
98
98
$ uriAuthMechanism = get_uri_option (URI , 'authMechanism ' );
99
99
100
- if ($ uriAuthMechanism === null ) {
100
+ if ($ uriAuthMechanism === null && $ authMechanism !== null ) {
101
101
exit ('skip URI is not using authMechanism ' );
102
102
}
103
103
You can’t perform that action at this time.
0 commit comments