Skip to content

Commit

Permalink
Minor test updates for jenkins coverage and token-pool (#2509)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcartwright authored and PyvesB committed Dec 11, 2018
1 parent bd930fa commit d74568b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/token-pool.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ describe('The token pool', function() {
})

describe('serializeDebugInfo should initially return the expected', function() {
beforeEach(function() {
sinon.useFakeTimers({ now: 1544307744484 })
})

afterEach(function() {
sinon.restore()
})

context('sanitize is not specified', function() {
it('returns fully sanitized results', function() {
// This is `sha()` of '1', '2', '3', '4', '5'. These are written
Expand All @@ -66,7 +74,7 @@ describe('The token pool', function() {
usesRemaining: batchSize,
})),
sanitized: true,
utcEpochSeconds: (Date.now() / 1000) | 0,
utcEpochSeconds: 1544307744,
})
})
})
Expand All @@ -86,7 +94,7 @@ describe('The token pool', function() {
usesRemaining: batchSize,
})),
sanitized: false,
utcEpochSeconds: (Date.now() / 1000) | 0,
utcEpochSeconds: 1544307744,
}
)
})
Expand Down
1 change: 1 addition & 0 deletions services/jenkins/jenkins-coverage.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ t.create('cobertura: job not found')

t.create('cobertura: job found')
.get('/c/https/builds.apache.org/job/olingo-odata4-cobertura.json')
.timeout(10000)
.expectJSONTypes(
Joi.object().keys({ name: 'coverage', value: isIntegerPercentage })
)

0 comments on commit d74568b

Please sign in to comment.