Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / tests / test_kdump.aug
1 (*
2 Module: Test_Kdump
3   Provides unit tests and examples for the <Kdump> lens.
4 *)
5
6 module Test_Kdump =
7
8    let conf = "# this is a comment
9 #another commented line
10
11 #comment after empty line
12 #
13 #comment after empty comment
14 auto_reset_crashkernel yes
15 path /var/crash  #comment after entry
16 core_collector makedumpfile -c
17 default poweroff
18 raw /dev/sda5
19 ext3 /dev/sda3
20 net my.server.com:/export/tmp
21 nfs my.server.com:/export/tmp
22 net user@my.server.com
23 ssh user@my.server.com
24 link_delay 60
25 kdump_pre /var/crash/scripts/kdump-pre.sh
26 kdump_post /var/crash/scripts/kdump-post.sh
27 #extra_bins /usr/bin/lftp /a/b/c
28 extra_bins /usr/bin/lftp           /a/b/c  # comment
29 disk_timeout 30
30 extra_modules gfs2 extra modules more
31 options babla    labl    kbak            df=dfg
32 options babla    labl    kbak            df=dfg
33 options babla    labl    kbak            df=dfg  # comment
34 sshkey /root/.ssh/kdump_id_rsa
35 force_rebuild 1
36 override_resettable 1
37 dracut_args --omit-drivers \"cfg80211 snd\" --add-drivers \"ext2 ext3\"
38 fence_kdump_args -p 7410 -f auto
39 fence_kdump_nodes 192.168.1.10 10.34.63.155
40 debug_mem_level 3
41 blacklist gfs2
42 "
43
44   (* Test: Kdump.lns
45      Check whole config file *)
46   test Kdump.lns get conf =
47     { "#comment" = "this is a comment" }
48     { "#comment" = "another commented line" }
49     {  }
50     { "#comment" = "comment after empty line" }
51     {  }
52     { "#comment" = "comment after empty comment" }
53     { "auto_reset_crashkernel" = "yes" }
54     { "path" = "/var/crash"
55       { "#comment" = "comment after entry" } }
56     { "core_collector" = "makedumpfile -c" }
57     { "default" = "poweroff" }
58     { "raw" = "/dev/sda5" }
59     { "ext3" = "/dev/sda3" }
60     { "net" = "my.server.com:/export/tmp" }
61     { "nfs" = "my.server.com:/export/tmp" }
62     { "net" = "user@my.server.com" }
63     { "ssh" = "user@my.server.com" }
64     { "link_delay" = "60" }
65     { "kdump_pre" = "/var/crash/scripts/kdump-pre.sh" }
66     { "kdump_post" = "/var/crash/scripts/kdump-post.sh" }
67     { "#comment" = "extra_bins /usr/bin/lftp /a/b/c" }
68     { "extra_bins"
69       { "1" = "/usr/bin/lftp" }
70       { "2" = "/a/b/c" }
71       { "#comment" = "comment" } }
72     { "disk_timeout" = "30" }
73     { "extra_modules"
74       { "1" = "gfs2" }
75       { "2" = "extra" }
76       { "3" = "modules" }
77       { "4" = "more" } }
78     { "options"
79       { "babla"
80         { "labl" }
81         { "kbak" }
82         { "df" = "dfg" } } }
83     { "options"
84       { "babla"
85         { "labl" }
86         { "kbak" }
87         { "df" = "dfg" } } }
88     { "options"
89       { "babla"
90         { "labl" }
91         { "kbak" }
92         { "df" = "dfg" } }
93       { "#comment" = "comment" } }
94     { "sshkey" = "/root/.ssh/kdump_id_rsa" }
95     { "force_rebuild" = "1" }
96     { "override_resettable" = "1" }
97     { "dracut_args" = "--omit-drivers \"cfg80211 snd\" --add-drivers \"ext2 ext3\"" }
98     { "fence_kdump_args" = "-p 7410 -f auto" }
99     { "fence_kdump_nodes"
100       { "1" = "192.168.1.10" }
101       { "2" = "10.34.63.155" } }
102     { "debug_mem_level" = "3" }
103     { "blacklist"
104       { "1" = "gfs2" } }