Fix broken unit tests
Recently we have included a new functionality that will help us displaying percentage values in a much better way. The problem was that it broke our tests and we haven't noticed. This commit fixes it. Change-Id: If11626cf2bdc7a0e8c04ea633f26fd69b708d57a
This commit is contained in:
parent
ed26267b06
commit
d8220ad139
|
@ -54,7 +54,7 @@ function TestsController(healthService) {
|
|||
|
||||
topFailures.forEach(function(test) {
|
||||
var failureAverage = getTestFailureAvg(test);
|
||||
if (!isNaN(failureAverage) && parseInt(failureAverage) > 0) {
|
||||
if (!isNaN(failureAverage) && parseFloat(failureAverage) > 0.01) {
|
||||
var chartData = {
|
||||
label: test.test_id,
|
||||
value: failureAverage
|
||||
|
|
|
@ -112,7 +112,7 @@ describe('ProjectController', function() {
|
|||
key: '% Failures',
|
||||
values: [{
|
||||
x: 1416355200000,
|
||||
y: 2.3529411764705883
|
||||
y: 0.023529411764705883
|
||||
}]
|
||||
}];
|
||||
expect(projectController.chartDataRate).toEqual(expectedChartDataRate);
|
||||
|
|
|
@ -70,7 +70,7 @@ describe('TestsController', function() {
|
|||
key: 'tempest.api.identity',
|
||||
values: [{
|
||||
label: 'tempest.api.identity.admin.v2.test_users.one',
|
||||
value: 10
|
||||
value: 0.1
|
||||
}],
|
||||
tests: [{
|
||||
failure: 5592,
|
||||
|
@ -79,7 +79,7 @@ describe('TestsController', function() {
|
|||
run_time: 0.608151,
|
||||
success: 55920,
|
||||
test_id: 'tempest.api.identity.admin.v2.test_users.one',
|
||||
failureAverage: 10
|
||||
failureAverage: 0.1
|
||||
}]
|
||||
}],
|
||||
'tempest.api.volume': [{
|
||||
|
@ -105,7 +105,7 @@ describe('TestsController', function() {
|
|||
run_time: 1.18864,
|
||||
success: 32291,
|
||||
test_id: 'tempest.api.network.test_routers.three',
|
||||
failureAverage: 0.00309674222717701
|
||||
failureAverage: 0.0000309674222717701
|
||||
}]
|
||||
}]
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue