diff --git a/app/js/controllers/tests.js b/app/js/controllers/tests.js index 7d4ef417..e95db23e 100644 --- a/app/js/controllers/tests.js +++ b/app/js/controllers/tests.js @@ -17,7 +17,7 @@ function TestsController(healthService, testService) { var testsByHierarchy = _.groupBy(data.tests, function(test) { var testId = testService.removeIdNoise(test.test_id); - var keyMatcher = /^(\w*\.\w*\.\w*)\./g; + var keyMatcher = /^(\w*)\./g; var matches = keyMatcher.exec(testId); if (matches) { diff --git a/app/views/tests.html b/app/views/tests.html index c8807995..2be55f18 100644 --- a/app/views/tests.html +++ b/app/views/tests.html @@ -15,12 +15,7 @@
-
-

Test failures for {{ key }}

-
- - +
@@ -42,7 +37,7 @@ Failed - + Failure % diff --git a/test/unit/controllers/tests_spec.js b/test/unit/controllers/tests_spec.js index 006cf8ff..14fbb558 100644 --- a/test/unit/controllers/tests_spec.js +++ b/test/unit/controllers/tests_spec.js @@ -66,8 +66,8 @@ describe('TestsController', function() { $httpBackend.flush(); var expectedChartData = { - 'tempest.api.identity': [{ - key: 'tempest.api.identity', + 'tempest': [{ + key: 'tempest', values: [{ label: 'tempest.api.identity.admin.v2.test_users.one', value: 0.1 @@ -80,12 +80,15 @@ describe('TestsController', function() { success: 55920, test_id: 'tempest.api.identity.admin.v2.test_users.one', failureAverage: 0.1 - }] - }], - 'tempest.api.volume': [{ - key: 'tempest.api.volume', - values: [], - tests: [{ + }, { + failure: 1, + id: '002a15e0-f6d1-472a-bd66-bb13ac4d77aa', + run_count: 32292, + run_time: 1.18864, + success: 32291, + test_id: 'tempest.api.network.test_routers.three', + failureAverage: 0.0000309674222717701 + }, { failure: 0, id: '001c6860-c966-4c0b-9928-ecccd162bed0', run_count: 4939, @@ -94,19 +97,6 @@ describe('TestsController', function() { test_id: 'tempest.api.volume.admin.test_snapshots_actions.two', failureAverage: 0 }] - }], - 'tempest.api.network': [{ - key: 'tempest.api.network', - values: [], - tests: [{ - failure: 1, - id: '002a15e0-f6d1-472a-bd66-bb13ac4d77aa', - run_count: 32292, - run_time: 1.18864, - success: 32291, - test_id: 'tempest.api.network.test_routers.three', - failureAverage: 0.0000309674222717701 - }] }] }; expect(testsController.chartData).toEqual(expectedChartData);