DEMO: add failure scenarios; alias next step
authorPawel Wieczorek <p.wieczorek2@samsung.com>
Tue, 19 Dec 2017 09:09:48 +0000 (10:09 +0100)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Fri, 5 Jan 2018 14:29:17 +0000 (15:29 +0100)
Change-Id: Ic391078d5770e91548dd0fa10d7e8fe0a151f072

demo/demo.sh
demo/nonex-artifact.yml
demo/nonex-device.yml

index 3204173..2e5da22 100644 (file)
@@ -1,44 +1,60 @@
 #doitlive speed: 2
 #doitlive commentecho: true
+#doitlive alias: next="echo 'next up:'"
 
 cd demo
 cat job.sh
 
-echo 'next up:'
+next
 #minimal job definition
 cat mini.yml
 curl -sL localhost:5010/api/v1/jobs/ -F "uploadfile=@mini.yml;"
 ./job.sh 'mini.yml'
 cat /tmp/weles/$(cat id)/TESTFILE/results*
 
-echo 'next up:'
+next
 #pull file from target
 cat pull.yml
 ./job.sh 'pull.yml'
 cat /tmp/weles/$(cat id)/TESTFILE/*info.ini
 
-echo 'next up:'
+next
 #push file to target
 cat push.yml
 curl -sL localhost:9090/echo_foo.sh
 ./job.sh 'push.yml'
 
-echo 'next up:'
+next
 #run pushed script on the target
 colordiff push.yml script.yml
 ./job.sh 'script.yml'
 cat /tmp/weles/$(cat id)/TESTFILE/results*
 
-echo 'next up:'
+next
+#wrong parameter in YAML job definition
+colordiff mini.yml wrong-param.yml
+./job.sh 'wrong-param.yml'
+
+next
+#nonexistent/unavailable device (on farm managed by Boruta)
+colordiff mini.yml nonex-device.yml
+./job.sh 'nonex-device.yml'
+
+next
+#nonexistent/unreachable artifact in YAML job definition
+colordiff push.yml nonex-artifact.yml
+./job.sh 'nonex-artifact.yml'
+
+next
 #run jobs in parallel
 cat parallel.yml
 for JOB in `seq 1 3`; do curl -sL localhost:5010/api/v1/jobs/ -F "uploadfile=@parallel.yml;" | jq '.jobid' | tee -a jobids; done
 
-echo 'next up:'
+next
 #cancel no longer necessary jobs
 while read JOBID; do curl -sL -X POST "localhost:5010/api/v1/jobs/${JOBID}/cancel"; done < jobids
 
-echo 'next up:'
+next
 #flash only necessary partitions
 colordiff mini.yml parts.yml
 ./job.sh 'parts.yml'
index 57e2f28..ff8847e 100644 (file)
@@ -7,10 +7,11 @@ actions:
       login: root
       password: tizen
   - test:
-      name: push-bar
+      name: push-foo
       test_cases:
-        - case_name: put-echo_bar.sh
+        - case_name: put-echo_foo.sh
           test_actions:
             - push:
                 uri: http://localhost:9090/echo_bar.sh
                 dest: /tmp
+                alias: echo_foo.sh
index 99cf24c..f116c0b 100644 (file)
@@ -5,7 +5,7 @@ priority: medium
 actions:
   - boot:
       login: root
-      password: toor
+      password: tizen
   - test:
       name: check-kernel
       test_cases: