Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / tests / test_pythonpaste.aug
1 module Test_pythonpaste =
2
3    let conf = "
4 #blah blah
5 [main]
6 pipeline = hello
7
8 [composite:main]
9 use = egg:Paste#urlmap
10 /v2.0 = public_api
11 /: public_version_api
12 "
13
14    test PythonPaste.lns get conf =
15       { }
16       { "#comment" = "blah blah" }
17       { "main"
18          { "pipeline" = "hello" }
19          { }
20       }
21       { "composite:main"
22          { "use" = "egg:Paste#urlmap" }
23          { "1" = "/v2.0 = public_api" }
24          { "2" = "/: public_version_api" }
25       }
26
27
28     test PythonPaste.lns put conf after
29        set "main/pipeline" "goodbye";
30        set "composite:main/3" "/v3: a_new_api_version"
31     = "
32 #blah blah
33 [main]
34 pipeline = goodbye
35
36 [composite:main]
37 use = egg:Paste#urlmap
38 /v2.0 = public_api
39 /: public_version_api
40 /v3: a_new_api_version
41 "
42
43     (* Paste can define global config in DEFAULT, then override with "set" in sections, RHBZ#1175545 *)
44     test PythonPaste.lns get "[DEFAULT]
45 log_name = swift
46 log_facility = LOG_LOCAL1
47
48 [app:proxy-server]
49 use = egg:swift#proxy
50 set log_name = proxy-server\n" =
51       { "DEFAULT"
52         { "log_name" = "swift" }
53         { "log_facility" = "LOG_LOCAL1" }
54         {  } }
55       { "app:proxy-server"
56         { "use" = "egg:swift#proxy" }
57         { "log_name" = "proxy-server"
58           { "@set" } } }