Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request mongofill#85 from discovery-digital/replset-fixes
Browse files Browse the repository at this point in the history
ReplicaSet fixes & Test Suite Enhancement
  • Loading branch information
mcuadros committed Aug 22, 2015
2 parents 7cdea75 + 921ff1c commit c2a16b7
Show file tree
Hide file tree
Showing 25 changed files with 1,026 additions and 145 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\.idea
\composer.lock
\vendor
.mongodb
29 changes: 28 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,43 @@
language: php

sudo: false

php:
- 5.4
- 5.5
- 5.6
- hhvm

services: mongodb
env:
global:
- MONGODB_STANDALONE_PORT=27017
- MONGODB_REPLSET_PRIMARY_PORT=27020
- MONGODB_REPLSET_SECONDARY_PORT=27023
- MONGODB_REPLSET_SECONDARY_TAGGED_PORT=27026
- MONGODB_REPLSET_HIDDEN_PORT=27029
- MONGODB_REPLSET_ARBITER_PORT=27032

matrix:
- MONGODB_VERSION=2.4.10 ADDL_TEST_GROUPS="mongo24x"
#- MONGODB_VERSION=2.6.9 ADDL_TEST_GROUPS="mongo26x" # Travis CI Containers do not have the mongodb-org repo whitelisted yet and there are no directly downloadable binaries for versions < 2.7.2
- MONGODB_VERSION=3.0.4 ADDL_TEST_GROUPS="mongo30x"
- MONGODB_VERSION=latest ADDL_TEST_GROUPS="mongo30x"

matrix:
allow_failures:
- env: MONGODB_VERSION=latest ADDL_TEST_GROUPS="mongo30x"
fast_finish: true

before_install:
- $TRAVIS_BUILD_DIR/tests/bin/bootstrap-travis-ci-env -p $TRAVIS_BUILD_DIR -v $MONGODB_VERSION
- $TRAVIS_BUILD_DIR/.mongodb/bin/mongo --version

before_script:
- composer install --dev --no-interaction --prefer-source

script:
- $TRAVIS_BUILD_DIR/vendor/bin/phpunit --group __nogroup__,replset,$ADDL_TEST_GROUPS --coverage-text

notifications:
irc:
channels:
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"ext-mongo": "*"
},
"require-dev": {
"athletic/athletic": "dev-master"
"athletic/athletic": "dev-master",
"phpunit/phpunit": "~4.7.7"
},
"autoload": {
"classmap": [
Expand Down
19 changes: 17 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,24 @@
colors="true"
backupGlobals="false"
>
<groups>
<include>
<!--
By default our tests assumes a standalone MongoDB 2.4.x instance running on port 27017
will be used. It will not run replset tests. Use list-groups to see all available
groups to fit your testing environment. The mongoxxx groups are only relevant for
the Integration Test Suite.
-->
<group>__nogroup__</group>
<group>mongo24x</group>
</include>
</groups>
<testsuites>
<testsuite name="Mongofill Test Suite">
<directory>./tests/</directory>
<testsuite name="unit">
<directory>./tests/Mongofill/Tests/Unit</directory>
</testsuite>
<testsuite name="integration">
<directory>./tests/Mongofill/Tests/Integration</directory>
</testsuite>
</testsuites>
</phpunit>
Loading

0 comments on commit c2a16b7

Please sign in to comment.