Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / tests / test_jettyrealm.aug
1 (*
2 Module: Test_JettyRealm
3   Provides unit tests and examples for the <JettyRealm> lens.
4 *)
5
6 module Test_JettyRealm =
7
8 (* Variable: conf *)
9 let conf = "### Comment
10 admin: admin, admin
11 "
12
13 (* Variable: conf_norealm *)
14 let conf_norealm = "### Comment
15 admin: admin
16 "
17
18 (* Variable: new_conf *) 
19 let new_conf = "### Comment
20 admin: password, admin
21 "
22
23 let lns = JettyRealm.lns 
24
25 (* Test: JettyRealm.lns  
26  * Get test against tree structure
27 *)
28 test lns get conf = 
29   { "#comment" = "## Comment" }
30   { "user" 
31     { "username" = "admin" }
32     { "password" = "admin" }
33     { "realm" = "admin" }
34   }
35
36 (* Test: JettyRealm.lns  
37  * Get test against tree structure without a realm
38 *)
39 test lns get conf_norealm = 
40   { "#comment" = "## Comment" }
41   { "user" 
42     { "username" = "admin" }
43     { "password" = "admin" }
44   }
45
46 (* Test: JettyRealm.lns  
47  * Put test changing password to password
48 *)
49 test lns put conf after set "/user/password" "password" = new_conf
50
51 (* vim: set ts=4  expandtab  sw=4: *)