mirror of
https://github.com/donl/slouch.git
synced 2026-06-30 06:11:57 -06:00
fix(circleci): use port 15984 (#62)
* fix(circleci): use port 15984 * fix(circleci): use config for port * fix(jshint) * fix(circleci): 15984
This commit is contained in:
parent
5f6e4e7138
commit
0adbd365ad
2 changed files with 15 additions and 20 deletions
29
circle.yml
29
circle.yml
|
|
@ -15,30 +15,33 @@ dependencies:
|
|||
- nvm use $NODE_VERSION && npm install -g npm
|
||||
|
||||
# Install CouchDB 2
|
||||
# - docker run -d --name couchdb --restart always -p 5984:5984 -e COUCHDB_USER='admin' -e COUCHDB_PASSWORD='admin' redgeoff/couchdb
|
||||
- docker run -d --name couchdb -p 5984:5984 -e COUCHDB_USER='admin' -e COUCHDB_PASSWORD='admin' redgeoff/couchdb
|
||||
- docker run -d --name couchdb -p 15984:5984 -e COUCHDB_USER='admin' -e COUCHDB_PASSWORD='admin' redgeoff/couchdb
|
||||
# Wait for DB to be ready
|
||||
- sleep 15
|
||||
# Create system DBs
|
||||
- curl -X PUT http://admin:admin@localhost:5984/_users
|
||||
- curl -X PUT http://admin:admin@localhost:5984/_replicator
|
||||
- curl -X PUT http://admin:admin@localhost:5984/_global_changes
|
||||
- curl -X PUT http://admin:admin@localhost:15984/_users
|
||||
- curl -X PUT http://admin:admin@localhost:15984/_replicator
|
||||
- curl -X PUT http://admin:admin@localhost:15984/_global_changes
|
||||
|
||||
# # Install CouchDB 1
|
||||
# - docker run -d --name couchdb-1 --restart always -p 15984:5984 couchdb:1.6.1
|
||||
# - docker run -d --name couchdb-1 -p 25984:5984 couchdb:1.6.1
|
||||
# # Wait for DB to be ready
|
||||
# - sleep 15
|
||||
# # Create admin user
|
||||
# - curl -X PUT localhost:15984/_config/admins/admin -d '"admin"'
|
||||
# - curl -X PUT localhost:25984/_config/admins/admin -d '"admin"'
|
||||
|
||||
# Enable CORS
|
||||
- nvm use $NODE_VERSION && npm install -g add-cors-to-couchdb
|
||||
- nvm use $NODE_VERSION && add-cors-to-couchdb http://localhost:5984 -u admin -p admin
|
||||
# - nvm use $NODE_VERSION && add-cors-to-couchdb http://localhost:15984 -u admin -p admin
|
||||
- nvm use $NODE_VERSION && add-cors-to-couchdb http://localhost:15984 -u admin -p admin
|
||||
# - nvm use $NODE_VERSION && add-cors-to-couchdb http://localhost:25984 -u admin -p admin
|
||||
|
||||
override:
|
||||
- nvm use $NODE_VERSION && npm install
|
||||
|
||||
# Change the host as we want a standard host that will work even from within the Docker
|
||||
# container
|
||||
- HOST_IP=`/sbin/ip route | awk '/eth0 proto/ { print $9 }'` && sed -i "s/localhost/$HOST_IP/g" test/config.json
|
||||
|
||||
test:
|
||||
pre:
|
||||
- nvm use $NODE_VERSION && npm run assert-beautified
|
||||
|
|
@ -46,6 +49,7 @@ test:
|
|||
|
||||
override:
|
||||
# Test on CouchDB 2
|
||||
- sed -i "s/5984/15984/g" test/config.json
|
||||
- nvm use $NODE_VERSION && npm run node-full-test
|
||||
- nvm use $NODE_VERSION && npm run browser-test-phantomjs
|
||||
- nvm use $NODE_VERSION && npm run browser-coverage-full-test
|
||||
|
|
@ -53,8 +57,5 @@ test:
|
|||
# TODO: replication and a number of other things doesn't appear to be working with the official
|
||||
# couchdb 1.6.1 docker image. We'll probably need to build a custom image for these tests.
|
||||
# Test on CouchDB 1
|
||||
# - nvm use $NODE_VERSION && COUCHDB_PORT=15984 npm run node-full-test
|
||||
|
||||
post:
|
||||
# Stop CouchDB instance to prevent bind conflicts with subsequent test containers
|
||||
- docker stop couchdb
|
||||
# - sed -i "s/15984/25894/g" test/config.json
|
||||
# - nvm use $NODE_VERSION npm run node-full-test
|
||||
|
|
|
|||
|
|
@ -4,12 +4,6 @@ var chai = require('chai');
|
|||
chai.use(require('chai-as-promised'));
|
||||
chai.should();
|
||||
|
||||
var config = require('./config.json');
|
||||
|
||||
if (process.env.COUCHDB_PORT) {
|
||||
config.couchdb.port = process.env.COUCHDB_PORT;
|
||||
}
|
||||
|
||||
describe('slouch', function () {
|
||||
|
||||
// Sometimes the DB gets a little backed up so we need more time for our tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue