Skip to content

Commit

Permalink
[travis] use development config
Browse files Browse the repository at this point in the history
  • Loading branch information
dunn committed Sep 4, 2016
1 parent 41cf9c3 commit 8c7ae85
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
12 changes: 4 additions & 8 deletions bin/travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ cd "$(dirname ${BASH_SOURCE[0]})"

sudo install -o "$USER" -d /etc/blocktogether
sudo install -o "$USER" -d /data/blocktogether

cp -a ../../config/* /etc/blocktogether/
sed "s/XXXXXXXXXXXXXXXXXXXXXXXXX/$CONSUMER_KEY/" ../../config/production.json \
sed "s/__CONSUMER_KEY__/$CONSUMER_KEY/" ../../config/development.json \
> /etc/blocktogether/config.json
sed -i "s/YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY/$CONSUMER_SECRET/" \
/etc/blocktogether/config.json
# turn off secureProxy
sed -i 's/true/false/' /etc/blocktogether/config.json
# use local callback
sed -i 's|https://blocktogether.org/auth/twitter/callback|http://localhost:2078/auth/twitter/callback|' \
/etc/blocktogether/config.json
sed -i "s/__CONSUMER_SECRET__/$CONSUMER_SECRET/" /etc/blocktogether/config.json

mysqladmin -u root password "$DB_ROOT_PASS"
sudo ../setup.sh
2 changes: 1 addition & 1 deletion bin/travis/before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ cd "$(dirname ${BASH_SOURCE[0]})/../../"

./run-dev.sh > bt.log 2>&1 &

until curl localhost:2078; do echo "Waiting for service..."; sleep 1; done
until curl localhost:3000; do echo "Waiting for service..."; sleep 1; done
9 changes: 4 additions & 5 deletions test/integration/signup_logon_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ var system = require('system');
var user = system.env.BT_TEST_MAIN_USER;
var pass = system.env.BT_TEST_MAIN_PASS;

var host = 'http://localhost';
var port = system.env.CI ? ":2078" : ":3000"
var host = 'http://localhost:3000';

function checkBoxes() {
return [
Expand Down Expand Up @@ -33,7 +32,7 @@ function clickAuthorize() {
// number of assertions occuring in the test, and the last is the test
// block itself.
casper.test.begin('Sign up and log on', 6, function(test) {
casper.start(host + port, function() {
casper.start(host , function() {
test.assertExists('form[action*="/auth/twitter"]', "log on form is present");
return this.fill('form[action*="/auth/twitter"]', {}, true);
});
Expand Down Expand Up @@ -61,7 +60,7 @@ casper.test.begin('Sign up and log on', 6, function(test) {
});

casper.then(function() {
casper.open(host + port + '/logout', function() {
casper.open(host + '/logout', function() {
return true;
});
});
Expand All @@ -78,7 +77,7 @@ casper.test.begin('Sign up and log on', 6, function(test) {
});

casper.then(function() {
casper.open(host + port + '/logout', function() {
casper.open(host + '/logout', function() {
return true;
});
});
Expand Down

0 comments on commit 8c7ae85

Please sign in to comment.