diff --git a/generate-cookiecutter-products.groovy b/generate-cookiecutter-products.groovy
index e734734..549a4d3 100644
--- a/generate-cookiecutter-products.groovy
+++ b/generate-cookiecutter-products.groovy
@@ -177,24 +177,20 @@
                     sh("cp -r ${modelEnv} ${testEnv}")
                     def DockerCName = "${env.JOB_NAME.toLowerCase()}_${env.BUILD_TAG.toLowerCase()}"
                     common.infoMsg("Attempt to run test against formula-version: ${mcpVersion}")
-                    testResult = saltModelTesting.setupAndTestNode(
-                        "${saltMaster}.${clusterDomain}",
-                        "",
-                        "",
-                        testEnv,
-                        'pkg',
-                        mcpVersion,
-                        reclassVersion,
-                        0,
-                        false,
-                        false,
-                        '',
-                        '',
-                        DockerCName)
-                    if (testResult) {
+                    try {
+                        def config = [
+                            'dockerHostname': "${saltMaster}.${clusterDomain}",
+                            'reclassEnv': testEnv,
+                            'formulasRevision': mcpVersion,
+                            'reclassVersion': reclassVersion,
+                            'dockerContainerName': DockerCName,
+                            'testContext': 'salt-model-node'
+                        ]
+                        testResult = saltModelTesting.testNode(config)
                         common.infoMsg("Test finished: SUCCESS")
-                    } else {
-                        common.warningMsg('Test finished: FAILURE')
+                    } catch (Exception ex) {
+                        common.warningMsg("Test finished: FAILED")
+                        testResult = false
                     }
                 } else {
                     common.warningMsg("Test stage has been skipped!")
diff --git a/test-cookiecutter-reclass-chunk.groovy b/test-cookiecutter-reclass-chunk.groovy
index 58355c1..ebc4f9a 100644
--- a/test-cookiecutter-reclass-chunk.groovy
+++ b/test-cookiecutter-reclass-chunk.groovy
@@ -17,7 +17,25 @@
             try {
                 extraVars = readYaml text: EXTRA_VARIABLES_YAML
                 currentBuild.description = extraVars.modelFile
-                saltModelTesting.testCCModel(extraVars)
+                sh(script:  'find . -mindepth 1 -delete || true', returnStatus: true)
+                sh(script: """
+                    wget --progress=dot:mega --auth-no-challenge -O models.tar.gz ${extraVars.MODELS_TARGZ}
+                    tar -xzf models.tar.gz
+                """)
+                common.infoMsg("Going to test exactly one context: ${extraVars.modelFile}\n, with params: ${extraVars}")
+
+                def content = readFile(file: extraVars.modelFile)
+                def templateContext = readYaml text: content
+                def config = [
+                    'dockerHostname': "cfg01.${templateContext.default_context.cluster_domain}",
+                    'clusterName': templateContext.default_context.cluster_name,
+                    'reclassEnv': extraVars.testReclassEnv,
+                    'formulasRevision': extraVars.DISTRIB_REVISION,
+                    'reclassVersion': extraVars.reclassVersion,
+                    'dockerContainerName': extraVars.DockerCName,
+                    'testContext': extraVars.modelFile
+                ]
+                saltModelTesting.testNode(config)
             } catch (Throwable e) {
                 // If there was an error or exception thrown, the build failed
                 currentBuild.result = "FAILURE"
diff --git a/test-salt-model-node.groovy b/test-salt-model-node.groovy
index 60477ee..9bbd782 100644
--- a/test-salt-model-node.groovy
+++ b/test-salt-model-node.groovy
@@ -8,7 +8,6 @@
  *  NODE_TARGET
  *  SYSTEM_GIT_URL
  *  SYSTEM_GIT_REF
- *  FORMULAS_SOURCE
  *  RECLASS_VERSION
  *  MAX_CPU_PER_JOB
  *  LEGACY_TEST_MODE
@@ -66,38 +65,23 @@
         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()}"
-              testResult = saltModelTesting.setupAndTestNode(
-                  NODE_TARGET,
-                  CLUSTER_NAME,
-                  '',
-                  workspace,
-                  FORMULAS_SOURCE,
-                  FORMULAS_REVISION,
-                  reclassVersion,
-                  MAX_CPU_PER_JOB.toInteger(),
-                  RECLASS_IGNORE_CLASS_NOTFOUND,
-                  LEGACY_TEST_MODE,
-                  APT_REPOSITORY,
-                  APT_REPOSITORY_GPG,
-                  DockerCName)
-            } catch (Exception e) {
-              if (e.getMessage() == "script returned exit code 124") {
-                common.errorMsg("Impossible to test node due to timeout of salt-master, ABORTING BUILD")
-                currentBuild.result = "ABORTED"
-              } else {
-                throw e
-              }
-            }
-            if (testResult) {
-              common.infoMsg("Test finished: SUCCESS")
-            } else {
-              error('Test node finished: FAILURE')
-              throw new RuntimeException('Test node stage finished: FAILURE')
-            }
+
+            def DockerCName = "${env.JOB_NAME.toLowerCase()}_${env.BUILD_TAG.toLowerCase()}"
+            def config = [
+              'dockerHostname': NODE_TARGET,
+              'clusterName': CLUSTER_NAME,
+              'reclassEnv': workspace,
+              'formulasRevision': FORMULAS_REVISION,
+              'reclassVersion': reclassVersion,
+              'dockerMaxCpus': MAX_CPU_PER_JOB.toInteger(),
+              'ignoreClassNotfound': RECLASS_IGNORE_CLASS_NOTFOUND,
+              'aptRepoUrl': APT_REPOSITORY,
+              'aptRepoGPG': APT_REPOSITORY_GPG,
+              'dockerContainerName': DockerCName,
+              'testContext': 'salt-model-node'
+            ]
+            saltModelTesting.testNode(config)
           }
         }
       } catch (Throwable e) {
