summaryrefslogtreecommitdiffstats
path: root/test/testcases/file
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/testcases/file14
-rw-r--r--test/testcases/file.exp77
2 files changed, 91 insertions, 0 deletions
diff --git a/test/testcases/file b/test/testcases/file
new file mode 100644
index 0000000..5f215b7
--- /dev/null
+++ b/test/testcases/file
@@ -0,0 +1,14 @@
+configure save sample.txt
+%ext cat sample.txt
+configure erase nodes
+configure load replace sample.txt
+%ext sed -i 's/60s/2m/' sample.txt
+%ext sed -i '8a # comment' sample.txt
+session Load update
+configure
+delete m1 p1
+property cluster-recheck-interval="10m"
+load update sample.txt
+.
+configure show
+%ext rm sample.txt
diff --git a/test/testcases/file.exp b/test/testcases/file.exp
new file mode 100644
index 0000000..dce48de
--- /dev/null
+++ b/test/testcases/file.exp
@@ -0,0 +1,77 @@
+.TRY configure save sample.txt
+.EXT cat sample.txt
+node node1
+primitive p0 ocf:pacemaker:Dummy \
+ op monitor timeout=20s interval=10s \
+ op start timeout=20s interval=0s \
+ op stop timeout=20s interval=0s
+primitive p1 ocf:pacemaker:Dummy \
+ op monitor timeout=20s interval=10s \
+ op start timeout=20s interval=0s \
+ op stop timeout=20s interval=0s
+primitive p2 Delay \
+ params startdelay=2 mondelay=2 stopdelay=2 \
+ op monitor timeout=30s interval=10s \
+ op start timeout=30s interval=0s \
+ op stop timeout=30s interval=0s
+primitive p3 ocf:pacemaker:Dummy \
+ op monitor timeout=20s interval=10s \
+ op start timeout=20s interval=0s \
+ op stop timeout=20s interval=0s
+primitive st stonith:null \
+ params hostlist=node1 \
+ op monitor timeout=20 interval=3600 \
+ op start timeout=20 interval=0s \
+ op stop timeout=15 interval=0s
+clone c1 p1 \
+ meta interleave=true
+clone m1 p2 \
+ meta promotable=true interleave=true
+rsc_defaults build-resource-defaults: \
+ resource-stickiness=1
+op_defaults op-options: \
+ timeout=60s
+.TRY configure erase nodes
+.TRY configure load replace sample.txt
+.EXT crm_resource --show-metadata ocf:pacemaker:Dummy
+.EXT crm_resource --show-metadata ocf:heartbeat:Delay
+.EXT crm_resource --show-metadata stonith:null
+.EXT stonithd metadata
+.EXT sed -i 's/60s/2m/' sample.txt
+.EXT sed -i '8a # comment' sample.txt
+.TRY Load update
+.INP: configure
+.INP: delete m1 p1
+.INP: property cluster-recheck-interval="10m"
+.INP: load update sample.txt
+ERROR: 4: syntax: Unknown command near <op> parsing 'op stop timeout=20s interval=0s'
+.EXT crmd metadata
+.EXT pengine metadata
+.EXT cib metadata
+.TRY configure show
+node node1
+primitive p0 ocf:pacemaker:Dummy \
+ op monitor timeout=20s interval=10s \
+ op start timeout=20s interval=0s \
+ op stop timeout=20s interval=0s
+primitive p2 Delay \
+ params startdelay=2 mondelay=2 stopdelay=2 \
+ op monitor timeout=30s interval=10s \
+ op start timeout=30s interval=0s \
+ op stop timeout=30s interval=0s
+primitive p3 ocf:pacemaker:Dummy \
+ op monitor timeout=20s interval=10s \
+ op start timeout=20s interval=0s \
+ op stop timeout=20s interval=0s
+primitive st stonith:null \
+ params hostlist=node1 \
+ op monitor timeout=20 interval=3600 \
+ op start timeout=20 interval=0s \
+ op stop timeout=15 interval=0s
+property cib-bootstrap-options: \
+ cluster-recheck-interval=10m
+rsc_defaults build-resource-defaults: \
+ resource-stickiness=1
+op_defaults op-options: \
+ timeout=60s
+.EXT rm sample.txt