3 Provides unit tests and examples for the <Carbon> lens.
8 let carbon_conf = "[cache]
9 # Configure carbon directories.
11 # Specify the user to drop privileges to
12 # If this is blank carbon runs as the user that invokes it
13 # This user must have write access to the local data directory
16 MAX_CACHE_SIZE = inf # comment at EOL
17 LINE_RECEIVER_INTERFACE=0.0.0.0
18 LINE_RECEIVER_PORT = 2003
19 ENABLE_UDP_LISTENER = False
22 LINE_RECEIVER_INTERFACE = 0.0.0.0
23 LINE_RECEIVER_PORT = 2013
24 PICKLE_RECEIVER_INTERFACE = 0.0.0.0
25 PICKLE_RECEIVER_PORT = 2014
28 test Carbon.lns get carbon_conf =
30 { "#comment" = "Configure carbon directories." }
32 { "#comment" = "Specify the user to drop privileges to" }
33 { "#comment" = "If this is blank carbon runs as the user that invokes it" }
34 { "#comment" = "This user must have write access to the local data directory" }
37 { "MAX_CACHE_SIZE" = "inf"
38 { "#comment" = "comment at EOL" }
40 { "LINE_RECEIVER_INTERFACE" = "0.0.0.0" }
41 { "LINE_RECEIVER_PORT" = "2003" }
42 { "ENABLE_UDP_LISTENER" = "False" }
46 { "LINE_RECEIVER_INTERFACE" = "0.0.0.0" }
47 { "LINE_RECEIVER_PORT" = "2013" }
48 { "PICKLE_RECEIVER_INTERFACE" = "0.0.0.0" }
49 { "PICKLE_RECEIVER_PORT" = "2014" }
52 let relay_rules_conf = "# You must have exactly one section with 'default = true'
53 # Note that all destinations listed must also exist in carbon.conf
54 # in the DESTINATIONS setting in the [relay] section
57 destinations = 127.0.0.1:2004:a, 127.0.0.1:2104:b
60 test Carbon.lns get relay_rules_conf =
61 { "#comment" = "You must have exactly one section with 'default = true'" }
62 { "#comment" = "Note that all destinations listed must also exist in carbon.conf" }
63 { "#comment" = "in the DESTINATIONS setting in the [relay] section" }
65 { "default" = "true" }
66 { "destinations" = "127.0.0.1:2004:a, 127.0.0.1:2104:b" }
69 let storage_aggregation_conf = "# Aggregation methods for whisper files. Entries are scanned in order,
70 # and first match wins. This file is scanned for changes every 60 seconds
74 aggregationMethod = max
77 test Carbon.lns get storage_aggregation_conf =
78 { "#comment" = "Aggregation methods for whisper files. Entries are scanned in order," }
79 { "#comment" = "and first match wins. This file is scanned for changes every 60 seconds" }
81 { "pattern" = "\.max$" }
82 { "xFilesFactor" = "0.1" }
83 { "aggregationMethod" = "max" }