Files
meteor/tools/tests/list-sites.js
Emily Stark ec0d2bc8b5 Progress towards self-test using DEPLOY_HOSTNAME.
Still can't run all tests against testing servers because the testing
accounts server would need to be configured to send email.
2014-08-25 19:37:47 -07:00

31 lines
1.0 KiB
JavaScript

var _ = require('underscore');
var selftest = require('../selftest.js');
var testUtils = require('../test-utils.js');
var files = require('../files.js');
var config = require("../config.js");
var Sandbox = selftest.Sandbox;
var commandTimeoutSecs = testUtils.accountsCommandTimeoutSecs;
selftest.define('list-sites - basic', ['net', 'slow'], function () {
var s = new Sandbox;
var email = testUtils.randomUserEmail();
var appName1 = testUtils.randomAppName() + "." + config.getDeployHostname();
var appName2 = testUtils.randomAppName() + "." + config.getDeployHostname();
testUtils.deployWithNewEmail(s, email, appName1);
testUtils.createAndDeployApp(s, { appName: appName2 });
var sortedApps = [appName1, appName2];
sortedApps.sort();
var run = s.run('list-sites');
run.waitSecs(commandTimeoutSecs);
_.each(sortedApps, function (app) {
run.read(app + '\n');
});
run.expectEnd();
run.expectExit(0);
testUtils.cleanUpApp(s, appName1);
testUtils.cleanUpApp(s, appName2);
testUtils.logout(s);
});