test: Port yaml test to mcl

This commit is contained in:
James Shubin
2019-03-15 13:01:50 -04:00
parent 753d1104ef
commit c4f57608d0
3 changed files with 9 additions and 72 deletions

View File

@@ -0,0 +1,8 @@
exec ["exec1", "exec2", "exec3", "exec4", "exec0",] {
cmd => "sleep 15s",
}
# linear chain
Exec["exec1"] -> Exec["exec2"]
Exec["exec2"] -> Exec["exec3"]
Exec["exec3"] -> Exec["exec4"]

View File

@@ -5,7 +5,7 @@
# should take 15 seconds for longest resources plus startup time to shutdown
# we don't want the ^C to allow the rest of the graph to continue executing!
# this is a test of mgmt exiting quickly via a fast pause after it sees a ^C
$TIMEOUT "$MGMT" run --no-watch --no-pgp --tmp-prefix yaml --yaml graph-exit1.yaml &
$TIMEOUT "$MGMT" run --no-watch --no-pgp --tmp-prefix lang --lang graph-exit1.mcl &
pid=$!
sleep 5s # let the initial resources start to run...
killall -SIGINT mgmt # send ^C to exit mgmt

View File

@@ -1,71 +0,0 @@
---
graph: parallel
resources:
exec:
- name: exec1
cmd: sleep 10s
shell: ''
timeout: 0
watchcmd: ''
watchshell: ''
ifcmd: ''
ifshell: ''
state: present
- name: exec2
cmd: sleep 10s
shell: ''
timeout: 0
watchcmd: ''
watchshell: ''
ifcmd: ''
ifshell: ''
state: present
- name: exec3
cmd: sleep 10s
shell: ''
timeout: 0
watchcmd: ''
watchshell: ''
ifcmd: ''
ifshell: ''
state: present
- name: exec4
cmd: sleep 10s
shell: ''
timeout: 0
watchcmd: ''
watchshell: ''
ifcmd: ''
ifshell: ''
state: present
- name: exec0
cmd: sleep 10s
shell: ''
timeout: 0
watchcmd: ''
watchshell: ''
ifcmd: ''
ifshell: ''
state: present
edges:
- name: e1
from:
kind: exec
name: exec1
to:
kind: exec
name: exec2
- name: e2
from:
kind: exec
name: exec2
to:
kind: exec
name: exec3
- name: e3
from:
kind: exec
name: exec3
to:
kind: exec
name: exec4