Modified the classnames for the test cases so that they work a bit better in Jenkins. Also adjusted the generate scripts to pull the latest commit sha from github.

This commit is contained in:
Spencer Alger
2013-11-14 09:45:19 -07:00
parent 39a3611849
commit 9ff959e1e6
6 changed files with 80 additions and 25 deletions

View File

@ -8,6 +8,7 @@ var jsYaml = require('js-yaml');
var spec = require('../../get_spec');
var clean = require('../../clean');
var _ = require('../../../src/lib/utils');
var restSpecUpdated = require('../../rest_spec_updated');
var testFile = path.resolve(__dirname, '../../../test/integration/yaml_suite/yaml_tests.json');
@ -30,15 +31,9 @@ function download() {
});
}
if (process.env.FORCE_GEN) {
download();
} else {
try {
var stat = fs.statSync(testFile);
if (!stat.isFile() || stat.ctime < Date.now() - 86400000) {
download();
}
} catch (e) {
restSpecUpdated(function (err, updated) {
if (process.env.FORCE_GEN || err || updated) {
download();
}
}
});