Commit e33705c67ba7d620eddd1addc05fa78126a98cd7

Authored by George Vlahavas

Merge branch 'master' of gitlab.com:gapan/kea

Showing 1 changed file

kea_testing.groovy View file @ e33705c
... ... @@ -89,7 +89,7 @@
89 89 echo '*** TESTS ***'
90 90 echo '*************'
91 91 /* Here do your tests */
92   - sleep 50
  92 + sleep 90
93 93 try {
94 94 String testName = "KEA_F001"
95 95 String url = "$APP_URL:13880"
... ... @@ -109,17 +109,6 @@
109 109 if (responseCode != '200') {
110 110 error("$testName: Returned status code = $responseCode when calling $url")
111 111 }
112   - testName = "KEA_F004"
113   - url = "mqtt://${HOST_IP}:1883/test"
114   - responseCode = sh(label: testName, script: "sleep 2 ; curl -d 1 $url & OUT=$( curl -m 4 -s $url ) ; echo $OUT", returnStdout: true)
115   - if (responseCode != 'test1') {
116   - error("$testName: Returned status code = $responseCode when calling $url")
117   - }
118   - testName = "KEA_F005"
119   - responseCode = sh(label: testName, script: "docker exec -ti kea_timescaledb psql -l -U postgres | grep -q kea ; echo $?", returnStdout: true)
120   - if (responseCode != '200') {
121   - error("$testName: Returned status code = $responseCode when calling $url")
122   - }
123 112 testName = "KEA_F006"
124 113 url = "$APP_URL:3001"
125 114 responseCode = sh(label: testName, script: "curl -m 10 -sLI -w '%{http_code}' $url -o /dev/null", returnStdout: true)
126 115  
... ... @@ -133,10 +122,21 @@
133 122 error("$testName: Returned status code = $responseCode when calling $url")
134 123 }
135 124 testName = "KEA_F008"
136   - url = "$APP_URL:13880/components/od"
  125 + url = "$APP_URL:13880/components/ceptd"
137 126 responseCode = sh(label: testName, script: "curl -m 10 -sLI -w '%{http_code}' $url -o /dev/null", returnStdout: true)
138 127 if (responseCode != '200') {
139 128 error("$testName: Returned status code = $responseCode when calling $url")
  129 + }
  130 + testName = "KEA_F004"
  131 + url = "mqtt://${HOST_IP}:1883/test"
  132 + responseCode = sh(label: testName, script: "sleep 2 ; curl -d 1 $url & OUT=`curl -m 4 -s $url` ; echo $OUT", returnStdout: true)
  133 + if (responseCode != 'test1') {
  134 + error("$testName: Returned status code = $responseCode when running MQTT test on $url")
  135 + }
  136 + testName = "KEA_F005"
  137 + responseCode = sh(label: testName, script: "docker exec -ti kea_timescaledb psql -l -U postgres | grep -q kea ; echo \$?", returnStdout: true)
  138 + if (responseCode != '0') {
  139 + error("$testName: Returned status code = $responseCode when looking for presense of kea DB")
140 140 }
141 141 } catch (ignored) {
142 142 currentBuild.result = 'FAILURE'