Use lastModified instead of etag
This commit is contained in:
parent
f0bc1391f6
commit
a71769b523
@ -4,10 +4,7 @@
|
|||||||
|
|
||||||
require('supererror')({ splatchError: true });
|
require('supererror')({ splatchError: true });
|
||||||
|
|
||||||
var async = require('async'),
|
var debug = require('debug')('e2e:runner'),
|
||||||
debug = require('debug')('e2e:runner'),
|
|
||||||
fs = require('fs'),
|
|
||||||
path = require('path'),
|
|
||||||
shell = require('./shell.js'),
|
shell = require('./shell.js'),
|
||||||
semver = require('semver'),
|
semver = require('semver'),
|
||||||
mailer = require('./mailer.js'),
|
mailer = require('./mailer.js'),
|
||||||
@ -17,7 +14,7 @@ var async = require('async'),
|
|||||||
// override debug.log to print only as console.log
|
// override debug.log to print only as console.log
|
||||||
debug.log = console.log.bind(console);
|
debug.log = console.log.bind(console);
|
||||||
|
|
||||||
var gLatestETag = null; // this allows us to rerun tests by restarting this process. and also for every appstore push
|
var gLastModified = null; // do not use etag since it only hashes body. touching file to rerun tests is nice
|
||||||
var gLatestBoxVersion = null; // for sending mail
|
var gLatestBoxVersion = null; // for sending mail
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
@ -32,8 +29,8 @@ function runTestsIfNeeded(callback) {
|
|||||||
getLatestBoxVersion(function (error, latestETag, latestBoxVersion, lastModified) {
|
getLatestBoxVersion(function (error, latestETag, latestBoxVersion, lastModified) {
|
||||||
if (error) return callback(error);
|
if (error) return callback(error);
|
||||||
|
|
||||||
if (latestETag === gLatestETag) {
|
if (lastModified === gLastModified) {
|
||||||
debug('Box version has not changed. etag %s', gLatestETag);
|
debug('Box version has not changed. etag:%s lm:%s', latestETag, lastModified);
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,8 +43,8 @@ function runTestsIfNeeded(callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
runTests(latestETag, latestBoxVersion, function (error) {
|
runTests(latestETag, latestBoxVersion, function (error) {
|
||||||
debug('Finished running tests for etag %s: %s', latestETag, error);
|
debug('Finished running tests for etag %s / lm %s: %s', latestETag, lastModified, error);
|
||||||
gLatestETag = latestETag;
|
gLastModified = lastModified;
|
||||||
gLatestBoxVersion = latestBoxVersion;
|
gLatestBoxVersion = latestBoxVersion;
|
||||||
callback(error);
|
callback(error);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user