Skip to content

Commit

Permalink
Move test_credentials.js to var/casper.
Browse files Browse the repository at this point in the history
  • Loading branch information
taranjeet authored and timabbott committed Jul 25, 2016
1 parent a131fc7 commit b143d6c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
*~
/all_messages_log.*
/event_log/*
frontend_tests/casper_lib/test_credentials.js
/prod-static
/errors/*
*.sw[po]
Expand Down
2 changes: 1 addition & 1 deletion frontend_tests/casper_lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var common = (function () {

var exports = {};

var test_credentials = require('../casper_lib/test_credentials.js').test_credentials;
var test_credentials = require('../../var/casper/test_credentials.js').test_credentials;

function timestamp() {
return new Date().getTime();
Expand Down
2 changes: 1 addition & 1 deletion frontend_tests/casper_tests/06-settings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var common = require('../casper_lib/common.js').common;
var test_credentials = require('../casper_lib/test_credentials.js').test_credentials;
var test_credentials = require('../../var/casper/test_credentials.js').test_credentials;

common.start_and_log_in();

Expand Down
2 changes: 1 addition & 1 deletion frontend_tests/casper_tests/10-admin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var common = require('../casper_lib/common.js').common;
var test_credentials = require('../casper_lib/test_credentials.js').test_credentials;
var test_credentials = require('../../var/casper/test_credentials.js').test_credentials;

common.start_and_log_in();

Expand Down
4 changes: 3 additions & 1 deletion tools/setup/generate-test-credentials
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ cd "$(dirname "$0")"/../..

[email protected]

mkdir -p var/casper

password=$(python manage.py print_initial_password "$email" | fgrep "$email" | awk '{ print $2 }')
cat > frontend_tests/casper_lib/test_credentials.js <<EOF
cat > var/casper/test_credentials.js <<EOF
// Generated by tools/setup/generate-test-credentials
var test_credentials = {default_user: {username: '$email', password: '$password'}};
try { exports.test_credentials = test_credentials; } catch (e) {}
Expand Down

0 comments on commit b143d6c

Please sign in to comment.