3 Provides unit tests and examples for the <Up2date> lens.
11 test Up2date.lns get empty =
14 (* Variable: list_empty *)
15 let list_empty = "keyword=;
17 test Up2date.lns get list_empty =
21 (* Variable: list_one *)
22 let list_one = "keyword=foo;
24 test Up2date.lns get list_one =
30 Probably not useful, up2date throws "bar" away *)
31 let list_two = "keyword=foo;bar
33 test Up2date.lns get list_two =
39 (* Variable: list_two_trailing *)
40 let list_two_trailing = "keyword=foo;bar;
42 test Up2date.lns get list_two_trailing =
49 let conf = "# Red Hat Update Agent config file.
52 debug[comment]=Whether or not debugging is enabled
55 systemIdPath[comment]=Location of system id
56 systemIdPath=/etc/sysconfig/rhn/systemid
58 serverURL[comment]=Remote server URL (use FQDN)
59 #serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC
60 serverURL=https://enter.your.server.url.here/XMLRPC
62 hostedWhitelist[comment]=RHN Hosted URL's
65 enableProxy[comment]=Use a HTTP Proxy
68 versionOverride[comment]=Override the automatically determined system version
71 httpProxy[comment]=HTTP proxy in host:port format, e.g. squid.redhat.com:3128
74 noReboot[comment]=Disable the reboot actions
77 networkRetries[comment]=Number of attempts to make at network connections before giving up
80 disallowConfChanges[comment]=Config options that can not be overwritten by a config update action
81 disallowConfChanges=noReboot;sslCACert;useNoSSLForPackages;noSSLServerURL;serverURL;disallowConfChanges;
83 sslCACert[comment]=The CA cert used to verify the ssl server
84 sslCACert=/usr/share/rhn/RHNS-CA-CERT
86 # Akamai does not support http protocol, therefore setting this option as side effect disable \"Location aware\" function
87 useNoSSLForPackages[comment]=Use the noSSLServerURL for package, package list, and header fetching (disable Akamai)
90 retrieveOnly[comment]=Retrieve packages only
93 skipNetwork[comment]=Skips network information in hardware profile sync during registration.
96 tmpDir[comment]=Use this Directory to place the temporary transport files
99 writeChangesToLog[comment]=Log to /var/log/up2date which packages has been added and removed
102 stagingContent[comment]=Retrieve content of future actions in advance
105 stagingContentWindow[comment]=How much forward we should look for future actions. In hours.
106 stagingContentWindow=24
109 (* Test: Up2date.lns *)
110 test Up2date.lns get conf =
111 { "#comment" = "Red Hat Update Agent config file." }
112 { "#comment" = "Format: 1.0" }
114 { "1" = "debug[comment]"
115 { "value" = "Whether or not debugging is enabled" } }
119 { "3" = "systemIdPath[comment]"
120 { "value" = "Location of system id" } }
121 { "4" = "systemIdPath"
122 { "value" = "/etc/sysconfig/rhn/systemid" } }
124 { "5" = "serverURL[comment]"
125 { "value" = "Remote server URL (use FQDN)" } }
126 { "#comment" = "serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC" }
128 { "value" = "https://enter.your.server.url.here/XMLRPC" } }
130 { "7" = "hostedWhitelist[comment]"
131 { "value" = "RHN Hosted URL's" } }
132 { "8" = "hostedWhitelist" }
134 { "9" = "enableProxy[comment]"
135 { "value" = "Use a HTTP Proxy" } }
136 { "10" = "enableProxy"
139 { "11" = "versionOverride[comment]"
140 { "value" = "Override the automatically determined system version" } }
141 { "12" = "versionOverride" }
143 { "13" = "httpProxy[comment]"
144 { "value" = "HTTP proxy in host:port format, e.g. squid.redhat.com:3128" } }
145 { "14" = "httpProxy" }
147 { "15" = "noReboot[comment]"
148 { "value" = "Disable the reboot actions" } }
152 { "17" = "networkRetries[comment]"
153 { "value" = "Number of attempts to make at network connections before giving up" } }
154 { "18" = "networkRetries"
157 { "19" = "disallowConfChanges[comment]"
158 { "value" = "Config options that can not be overwritten by a config update action" } }
159 { "20" = "disallowConfChanges"
162 { "2" = "sslCACert" }
163 { "3" = "useNoSSLForPackages" }
164 { "4" = "noSSLServerURL" }
165 { "5" = "serverURL" }
166 { "6" = "disallowConfChanges" } } }
168 { "21" = "sslCACert[comment]"
169 { "value" = "The CA cert used to verify the ssl server" } }
171 { "value" = "/usr/share/rhn/RHNS-CA-CERT" } }
173 { "#comment" = "Akamai does not support http protocol, therefore setting this option as side effect disable \"Location aware\" function" }
174 { "23" = "useNoSSLForPackages[comment]"
175 { "value" = "Use the noSSLServerURL for package, package list, and header fetching (disable Akamai)" } }
176 { "24" = "useNoSSLForPackages"
179 { "25" = "retrieveOnly[comment]"
180 { "value" = "Retrieve packages only" } }
181 { "26" = "retrieveOnly"
184 { "27" = "skipNetwork[comment]"
185 { "value" = "Skips network information in hardware profile sync during registration." } }
186 { "28" = "skipNetwork"
189 { "29" = "tmpDir[comment]"
190 { "value" = "Use this Directory to place the temporary transport files" } }
192 { "value" = "/tmp" } }
194 { "31" = "writeChangesToLog[comment]"
195 { "value" = "Log to /var/log/up2date which packages has been added and removed" } }
196 { "32" = "writeChangesToLog"
199 { "33" = "stagingContent[comment]"
200 { "value" = "Retrieve content of future actions in advance" } }
201 { "34" = "stagingContent"
204 { "35" = "stagingContentWindow[comment]"
205 { "value" = "How much forward we should look for future actions. In hours." } }
206 { "36" = "stagingContentWindow"