Added tests result parsing to test-service pipeline

Change-Id: Ic84ab227f9784fa7fbfe6d2adeef73289efef4a2
diff --git a/test-service.groovy b/test-service.groovy
index 29c88b2..1caf00c 100644
--- a/test-service.groovy
+++ b/test-service.groovy
@@ -87,18 +87,10 @@
 
             writeFile(file: 'report.xml', text: salt.getFileContent(saltMaster, TEST_TEMPEST_TARGET, '/root/report.xml'))
             junit(keepLongStdio: true, testResults: 'report.xml', healthScaleFactor:  Double.parseDouble(TEST_JUNIT_RATIO))
-        }
-        stage("Approve test results"){
-          try {
-            timeout(time: 1, unit: 'HOURS'){
-              userInput = input message: 'Do you want to approve test results?'
+            def testResults = test.collectJUnitResults(currentBuild.rawBuild.getAction(AbstractTestResultAction.class))
+            if(testResults){
+                currentBuild.desc = String.format("result: %s", testResults["failed"] / testResults["total"])
             }
-            common.successMsg("Test results approved")
-            currentBuild.desc = "result: true"
-          } catch(err) { // timeout reached or input false
-            common.errorMsg("Test results not approved")
-            currentBuild.desc = "result: false"
-          }
         }
     } catch (Throwable e) {
         currentBuild.result = 'FAILURE'