Fix saltModelTesting.setupAndTestNode call's
* setupAndTestNode function has been refectored, and now return
true\false result. Otherwise, function result has not been checked.
* Since setupAndTestNode now return answer, no sence to use retry on it-
it's never throw expected exception.
Change-Id: I84ee45964151ebf3bae0f52fb25d5b7f60428d75
diff --git a/test-salt-model-node.groovy b/test-salt-model-node.groovy
index 694f048..9e72555 100644
--- a/test-salt-model-node.groovy
+++ b/test-salt-model-node.groovy
@@ -62,11 +62,11 @@
stage("test node") {
if (checkouted) {
def workspace = common.getWorkspace()
+ def testResult = false
common.infoMsg("Running salt model test for node ${NODE_TARGET} in cluster ${CLUSTER_NAME}")
try {
def DockerCName = "${env.JOB_NAME.toLowerCase()}_${env.BUILD_TAG.toLowerCase()}"
-
- test_result = saltModelTesting.setupAndTestNode(
+ testResult = saltModelTesting.setupAndTestNode(
NODE_TARGET,
CLUSTER_NAME,
EXTRA_FORMULAS,
@@ -88,10 +88,10 @@
throw e
}
}
- if (test_result) {
+ if (testResult) {
common.infoMsg("Test finished: SUCCESS")
} else {
- common.warningMsg("Test finished: FAILURE")
+ error('Test finished: FAILURE')
currentBuild.result = "FAILURE"
}
}