File tree 3 files changed +46
-0
lines changed
3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 16
16
17
17
matrix :
18
18
include :
19
+ - php : 7.2
20
+ env :
21
+ - TESTS=tests/atlas.phpt
22
+ - TEST_PHP_ARGS="-q -s output.txt -x --show-diff"
19
23
- php : 5.5
20
24
- php : 5.6
21
25
- php : 7.0
@@ -57,6 +61,7 @@ matrix:
57
61
- SERVER_VERSION=3.6.5
58
62
59
63
before_install :
64
+ - openssl aes-256-cbc -K $encrypted_b354efda2943_key -iv $encrypted_b354efda2943_iv -in .travis.scripts/atlas-uris.txt.enc -out .travis.scripts/atlas-uris.txt -d || true
60
65
- pip install "mongo-orchestration>=0.6.7,<1.0" --user `whoami`
61
66
- .travis.scripts/before_install.sh
62
67
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-${SERVER_VERSION}.tgz
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Atlas Connectivity Tests
3
+ --SKIPIF--
4
+ <?php
5
+ if (!file_exists ('.travis.scripts/atlas-uris.txt ' )) { echo "skip Atlas URIs not found \n" ; }
6
+ if (filesize ('.travis.scripts/atlas-uris.txt ' ) < 10 ) { echo "skip Atlas URI file empty \n" ; }
7
+ if ($ _ENV ['TESTS ' ] !== 'tests/atlas.phpt ' ) { echo "skip Atlas tests not wanted \n" ; }
8
+ ?>
9
+ --FILE--
10
+ <?php
11
+ $ urls = explode ("\n" , file_get_contents ('.travis.scripts/atlas-uris.txt ' ));
12
+
13
+ $ isMasterCmd = new \MongoDB \Driver \Command (['isMaster ' => 1 ]);
14
+ $ query = new \MongoDB \Driver \Query ([]);
15
+
16
+ foreach ($ urls as $ url ) {
17
+ $ url = trim ($ url );
18
+ if ($ url == '' ) {
19
+ continue ;
20
+ }
21
+
22
+ try {
23
+ $ m = new \MongoDB \Driver \Manager ($ url );
24
+ $ m ->executeCommand ('admin ' , $ isMasterCmd );
25
+ iterator_to_array ($ m ->executeQuery ('test.test ' , $ query ));
26
+ echo "PASS \n" ;
27
+ } catch (Exception $ e ) {
28
+ echo "FAIL: " , $ e ->getMessage (), "\n" ;
29
+ }
30
+ }
31
+ ?>
32
+ ===DONE===
33
+ <?php exit (0 ); ?>
34
+ --EXPECTF--
35
+ PASS
36
+ PASS
37
+ PASS
38
+ PASS
39
+ PASS
40
+ FAIL: %s
41
+ ===DONE===
You can’t perform that action at this time.
0 commit comments