mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Fix all JSHint complaints in Node.js code.
This commit is contained in:
parent
f62ce4acc1
commit
b4416b5f0f
31 changed files with 126 additions and 119 deletions
|
@ -1,6 +1,3 @@
|
|||
var assert = require('assert')
|
||||
var util = require('util')
|
||||
|
||||
var r = require('rethinkdb')
|
||||
var Promise = require('bluebird')
|
||||
|
||||
|
@ -24,7 +21,7 @@ module.exports = function(conn) {
|
|||
.then(function() {
|
||||
log.info('Database "%s" created', conn.db)
|
||||
})
|
||||
.catch(alreadyExistsError, function(err) {
|
||||
.catch(alreadyExistsError, function() {
|
||||
log.info('Database "%s" already exists', conn.db)
|
||||
return Promise.resolve()
|
||||
})
|
||||
|
@ -38,11 +35,11 @@ module.exports = function(conn) {
|
|||
.then(function() {
|
||||
log.info('Table "%s" created', table)
|
||||
})
|
||||
.catch(alreadyExistsError, function(err) {
|
||||
.catch(alreadyExistsError, function() {
|
||||
log.info('Table "%s" already exists', table)
|
||||
return Promise.resolve()
|
||||
})
|
||||
.catch(noMasterAvailableError, function(err) {
|
||||
.catch(noMasterAvailableError, function() {
|
||||
return Promise.delay(1000).then(function() {
|
||||
return createTable(table, options)
|
||||
})
|
||||
|
@ -61,11 +58,11 @@ module.exports = function(conn) {
|
|||
.then(function() {
|
||||
log.info('Index "%s"."%s" created', table, index)
|
||||
})
|
||||
.catch(alreadyExistsError, function(err) {
|
||||
.catch(alreadyExistsError, function() {
|
||||
log.info('Index "%s"."%s" already exists', table, index)
|
||||
return Promise.resolve()
|
||||
})
|
||||
.catch(noMasterAvailableError, function(err) {
|
||||
.catch(noMasterAvailableError, function() {
|
||||
return Promise.delay(1000).then(function() {
|
||||
return createIndex(table, index, fn)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue