Skip to content

Commit 6563d28

Browse files
committed
PHPC-1184: Add replica set with single node
1 parent d850868 commit 6563d28

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

.travis.scripts/setup_mo.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ case $DEPLOYMENT in
2727
${TRAVIS_BUILD_DIR}/.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR}/scripts/presets/travis/replica_sets/replicaset.json start > /tmp/mo-result.json
2828
cat /tmp/mo-result.json | tail -n 1 | php -r 'echo json_decode(file_get_contents("php://stdin"))->mongodb_uri;' > /tmp/uri.txt
2929
;;
30+
REPLICASET_SINGLE)
31+
${TRAVIS_BUILD_DIR}/.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR}/scripts/presets/travis/replica_sets/replicaset-one-node.json start > /tmp/mo-result.json
32+
cat /tmp/mo-result.json | tail -n 1 | php -r 'echo json_decode(file_get_contents("php://stdin"))->mongodb_uri;' > /tmp/uri.txt
33+
;;
3034
REPLICASET_OLD)
3135
${TRAVIS_BUILD_DIR}/.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR}/scripts/presets/travis/replica_sets/replicaset-old.json start > /tmp/mo-result.json
3236
cat /tmp/mo-result.json | tail -n 1 | php -r 'echo json_decode(file_get_contents("php://stdin"))->mongodb_uri;' > /tmp/uri.txt

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ matrix:
4040
- php: 7.2
4141
env:
4242
- DEPLOYMENT=REPLICASET
43+
- php: 7.2
44+
env:
45+
- DEPLOYMENT=REPLICASET_SINGLE
4346
- php: 7.2
4447
env:
4548
- SERVER_VERSION=3.0.15
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"id": "REPLICASET_SINGLE",
3+
"name": "mongod",
4+
"members": [
5+
{
6+
"procParams": {
7+
"dbpath": "/tmp/REPLICASET/3020/",
8+
"ipv6": true,
9+
"logappend": true,
10+
"logpath": "/tmp/REPLICASET/3020/mongod.log",
11+
"journal": true,
12+
"nssize": 1,
13+
"port": 3020,
14+
"bind_ip_all": true,
15+
"smallfiles": true
16+
},
17+
"rsParams": {
18+
"priority": 99,
19+
"tags": {
20+
"ordinal": "one",
21+
"dc": "pa"
22+
}
23+
},
24+
"server_id": "RS-alone"
25+
}
26+
]
27+
}

0 commit comments

Comments
 (0)