Skip to content

Commit de28a1e

Browse files
committed
Merged pull request #905
2 parents 4c298a9 + 2263fd1 commit de28a1e

File tree

4 files changed

+126
-1
lines changed

4 files changed

+126
-1
lines changed

.travis.scripts/setup_mo.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ case $DEPLOYMENT in
77
${TRAVIS_BUILD_DIR}/.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR}/scripts/presets/travis/sharded_clusters/cluster.json start > /tmp/mo-result.json
88
cat /tmp/mo-result.json | tail -n 1 | php -r 'echo json_decode(file_get_contents("php://stdin"))->mongodb_uri;' > /tmp/uri.txt
99
;;
10+
SHARDED_CLUSTER_RS)
11+
${TRAVIS_BUILD_DIR}/.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR}/scripts/presets/travis/sharded_clusters/cluster_replset.json start > /tmp/mo-result.json
12+
cat /tmp/mo-result.json | tail -n 1 | php -r 'echo json_decode(file_get_contents("php://stdin"))->mongodb_uri;' > /tmp/uri.txt
13+
;;
1014
STANDALONE_AUTH)
1115
${TRAVIS_BUILD_DIR}/.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR}/scripts/presets/travis/standalone/standalone-auth.json start > /tmp/mo-result.json
1216
cat /tmp/mo-result.json | tail -n 1 | php -r 'echo json_decode(file_get_contents("php://stdin"))->mongodb_auth_uri;' > /tmp/uri.txt

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ matrix:
3131
- php: 7.2
3232
env:
3333
- DEPLOYMENT=SHARDED_CLUSTER
34+
- php: 7.2
35+
env:
36+
- DEPLOYMENT=SHARDED_CLUSTER_RS
3437
- php: 7.2
3538
env:
3639
- DEPLOYMENT=STANDALONE_AUTH
@@ -58,7 +61,7 @@ matrix:
5861
- SERVER_VERSION=3.6.5
5962

6063
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
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
6265
- pip install "mongo-orchestration>=0.6.7,<1.0" --user `whoami`
6366
- .travis.scripts/before_install.sh
6467
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-${SERVER_VERSION}.tgz
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
"configsvrs": [ {
3+
"members" : [
4+
{
5+
"procParams": {
6+
"dbpath": "/tmp/SHARDED-RS/CFG/4490",
7+
"logpath": "/tmp/SHARDED-RS/CFG/4490/mongod.log",
8+
"ipv6": true,
9+
"journal": true,
10+
"logappend": true,
11+
"nssize": 1,
12+
"port": 4490,
13+
"bind_ip_all": true,
14+
"smallfiles": true
15+
}
16+
},
17+
{
18+
"procParams": {
19+
"dbpath": "/tmp/SHARDED-RS/CFG/4491",
20+
"logpath": "/tmp/SHARDED-RS/CFG/4491/mongod.log",
21+
"ipv6": true,
22+
"journal": true,
23+
"logappend": true,
24+
"nssize": 1,
25+
"port": 4491,
26+
"bind_ip_all": true,
27+
"smallfiles": true
28+
}
29+
},
30+
{
31+
"procParams": {
32+
"dbpath": "/tmp/SHARDED-RS/CFG/4492",
33+
"logpath": "/tmp/SHARDED-RS/CFG/4492/mongod.log",
34+
"ipv6": true,
35+
"journal": true,
36+
"logappend": true,
37+
"nssize": 1,
38+
"port": 4492,
39+
"bind_ip_all": true,
40+
"smallfiles": true
41+
}
42+
}
43+
]
44+
} ],
45+
"id": "cluster_rs",
46+
"shards": [
47+
{
48+
"id": "cluster-rs-sh01",
49+
"shardParams": {
50+
"id": "sh01-rs",
51+
"members": [
52+
{ "procParams": {
53+
"dbpath": "/tmp/SHARDED-RS/SHARD1/4400",
54+
"logpath": "/tmp/SHARDED-RS/SHARD1/4400/mongod.log",
55+
"ipv6": true,
56+
"journal": true,
57+
"logappend": true,
58+
"nssize": 1,
59+
"port": 4400,
60+
"bind_ip_all": true,
61+
"smallfiles": true
62+
} },
63+
{ "procParams": {
64+
"dbpath": "/tmp/SHARDED-RS/SHARD1/4401",
65+
"logpath": "/tmp/SHARDED-RS/SHARD1/4401/mongod.log",
66+
"ipv6": true,
67+
"journal": true,
68+
"logappend": true,
69+
"nssize": 1,
70+
"port": 4401,
71+
"bind_ip_all": true,
72+
"smallfiles": true
73+
} }
74+
]
75+
}
76+
},
77+
{
78+
"id": "cluster-rs-sh02",
79+
"shardParams": {
80+
"id": "sh02-rs",
81+
"members": [
82+
{ "procParams": {
83+
"dbpath": "/tmp/SHARDED-RS/SHARD2/4410",
84+
"logpath": "/tmp/SHARDED-RS/SHARD2/4410/mongod.log",
85+
"ipv6": true,
86+
"journal": true,
87+
"logappend": true,
88+
"nssize": 1,
89+
"port": 4410,
90+
"bind_ip_all": true,
91+
"smallfiles": true
92+
} },
93+
{ "procParams": {
94+
"dbpath": "/tmp/SHARDED-RS/SHARD2/4411",
95+
"logpath": "/tmp/SHARDED-RS/SHARD2/4411/mongod.log",
96+
"ipv6": true,
97+
"journal": true,
98+
"logappend": true,
99+
"nssize": 1,
100+
"port": 4411,
101+
"bind_ip_all": true,
102+
"smallfiles": true
103+
} }
104+
]
105+
}
106+
}
107+
],
108+
"routers": [
109+
{
110+
"logpath": "/tmp/SHARDED-RS/ROUTER/4430/mongod.log",
111+
"ipv6": true,
112+
"logappend": true,
113+
"port": 4430,
114+
"bind_ip_all": true
115+
}
116+
]
117+
}

tests/atlas.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Atlas Connectivity Tests
33
--SKIPIF--
44
<?php
55
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"; }
67
if ($_ENV['TESTS'] !== 'tests/atlas.phpt') { echo "skip Atlas tests not wanted\n"; }
78
?>
89
--FILE--

0 commit comments

Comments
 (0)