diff --git a/kea_testing.groovy b/kea_testing.groovy index 66904ef..e253a68 100644 --- a/kea_testing.groovy +++ b/kea_testing.groovy @@ -109,17 +109,6 @@ pipeline { if (responseCode != '200') { error("$testName: Returned status code = $responseCode when calling $url") } - testName = "KEA_F004" - url = "mqtt://${HOST_IP}:1883/test" - responseCode = sh(label: testName, script: "sleep 2 ; curl -d 1 $url & OUT=`curl -m 4 -s $url` ; echo $OUT", returnStdout: true) - if (responseCode != 'test1') { - error("$testName: Returned status code = $responseCode when running MQTT test on $url") - } - testName = "KEA_F005" - responseCode = sh(label: testName, script: "docker exec -ti kea_timescaledb psql -l -U postgres | grep -q kea ; echo \$?", returnStdout: true) - if (responseCode != '0') { - error("$testName: Returned status code = $responseCode when looking for presense of kea DB") - } testName = "KEA_F006" url = "$APP_URL:3001" responseCode = sh(label: testName, script: "curl -m 10 -sLI -w '%{http_code}' $url -o /dev/null", returnStdout: true) @@ -138,6 +127,17 @@ pipeline { if (responseCode != '200') { error("$testName: Returned status code = $responseCode when calling $url") } + testName = "KEA_F004" + url = "mqtt://${HOST_IP}:1883/test" + responseCode = sh(label: testName, script: "sleep 2 ; curl -d 1 $url & OUT=`curl -m 4 -s $url` ; echo $OUT", returnStdout: true) + if (responseCode != 'test1') { + error("$testName: Returned status code = $responseCode when running MQTT test on $url") + } + testName = "KEA_F005" + responseCode = sh(label: testName, script: "docker exec -ti kea_timescaledb psql -l -U postgres | grep -q kea ; echo \$?", returnStdout: true) + if (responseCode != '0') { + error("$testName: Returned status code = $responseCode when looking for presense of kea DB") + } } catch (ignored) { currentBuild.result = 'FAILURE' echo "KEA Deployment Tests failed"