Fix missing status parameter (mostly for tests)

This commit is contained in:
Baptiste Mathus 2018-10-12 19:21:11 +02:00
parent 5b39ffd556
commit 52013fc3e7
1 changed files with 4 additions and 4 deletions

View File

@ -51,11 +51,11 @@ export default class Update {
this.healthChecker = new HealthChecker(process.env.JENKINS_URL || 'http://127.0.0.1:8080');
}
if(!this.options.status) {
throw new Error('Missing required status attribute');
if (this.options.status) {
this.status = this.options.status;
} else {
this.status = this.status = new Status(this.app, { flavor: process.env.FLAVOR });
}
this.status = this.options.status;
}
authenticate(uuid, token) {