File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Expand file tree Collapse file tree 3 files changed +45
-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
@@ -54,6 +58,7 @@ matrix:
54
58
- SERVER_VERSION=3.6.5
55
59
56
60
before_install :
61
+ - 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
57
62
- pip install "mongo-orchestration>=0.6.7,<1.0" --user `whoami`
58
63
- .travis.scripts/before_install.sh
59
64
- 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 ($ _ENV ['TESTS ' ] !== 'tests/atlas.phpt ' ) { echo "skip Atlas tests not wanted \n" ; }
7
+ ?>
8
+ --FILE--
9
+ <?php
10
+ $ urls = explode ("\n" , file_get_contents ('.travis.scripts/atlas-uris.txt ' ));
11
+
12
+ $ isMasterCmd = new \MongoDB \Driver \Command (['isMaster ' => 1 ]);
13
+ $ query = new \MongoDB \Driver \Query ([]);
14
+
15
+ foreach ($ urls as $ url ) {
16
+ $ url = trim ($ url );
17
+ if ($ url == '' ) {
18
+ continue ;
19
+ }
20
+
21
+ try {
22
+ $ m = new \MongoDB \Driver \Manager ($ url );
23
+ $ m ->executeCommand ('admin ' , $ isMasterCmd );
24
+ iterator_to_array ($ m ->executeQuery ('test.test ' , $ query ));
25
+ echo "PASS \n" ;
26
+ } catch (Exception $ e ) {
27
+ echo "FAIL: " , $ e ->getMessage (), "\n" ;
28
+ }
29
+ }
30
+ ?>
31
+ ===DONE===
32
+ <?php exit (0 ); ?>
33
+ --EXPECTF--
34
+ PASS
35
+ PASS
36
+ PASS
37
+ PASS
38
+ PASS
39
+ FAIL: %s
40
+ ===DONE===
You can’t perform that action at this time.
0 commit comments