|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: Test_Carbon
|
|
Packit Service |
a2ae7a |
Provides unit tests and examples for the <Carbon> lens.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Test_Carbon =
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let carbon_conf = "[cache]
|
|
Packit Service |
a2ae7a |
# Configure carbon directories.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
# Specify the user to drop privileges to
|
|
Packit Service |
a2ae7a |
# If this is blank carbon runs as the user that invokes it
|
|
Packit Service |
a2ae7a |
# This user must have write access to the local data directory
|
|
Packit Service |
a2ae7a |
USER =
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
MAX_CACHE_SIZE = inf # comment at EOL
|
|
Packit Service |
a2ae7a |
LINE_RECEIVER_INTERFACE=0.0.0.0
|
|
Packit Service |
a2ae7a |
LINE_RECEIVER_PORT = 2003
|
|
Packit Service |
a2ae7a |
ENABLE_UDP_LISTENER = False
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
[relay]
|
|
Packit Service |
a2ae7a |
LINE_RECEIVER_INTERFACE = 0.0.0.0
|
|
Packit Service |
a2ae7a |
LINE_RECEIVER_PORT = 2013
|
|
Packit Service |
a2ae7a |
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
|
|
Packit Service |
a2ae7a |
PICKLE_RECEIVER_PORT = 2014
|
|
Packit Service |
a2ae7a |
"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
test Carbon.lns get carbon_conf =
|
|
Packit Service |
a2ae7a |
{ "cache"
|
|
Packit Service |
a2ae7a |
{ "#comment" = "Configure carbon directories." }
|
|
Packit Service |
a2ae7a |
{ }
|
|
Packit Service |
a2ae7a |
{ "#comment" = "Specify the user to drop privileges to" }
|
|
Packit Service |
a2ae7a |
{ "#comment" = "If this is blank carbon runs as the user that invokes it" }
|
|
Packit Service |
a2ae7a |
{ "#comment" = "This user must have write access to the local data directory" }
|
|
Packit Service |
a2ae7a |
{ "USER" }
|
|
Packit Service |
a2ae7a |
{ }
|
|
Packit Service |
a2ae7a |
{ "MAX_CACHE_SIZE" = "inf"
|
|
Packit Service |
a2ae7a |
{ "#comment" = "comment at EOL" }
|
|
Packit Service |
a2ae7a |
}
|
|
Packit Service |
a2ae7a |
{ "LINE_RECEIVER_INTERFACE" = "0.0.0.0" }
|
|
Packit Service |
a2ae7a |
{ "LINE_RECEIVER_PORT" = "2003" }
|
|
Packit Service |
a2ae7a |
{ "ENABLE_UDP_LISTENER" = "False" }
|
|
Packit Service |
a2ae7a |
{ }
|
|
Packit Service |
a2ae7a |
}
|
|
Packit Service |
a2ae7a |
{ "relay"
|
|
Packit Service |
a2ae7a |
{ "LINE_RECEIVER_INTERFACE" = "0.0.0.0" }
|
|
Packit Service |
a2ae7a |
{ "LINE_RECEIVER_PORT" = "2013" }
|
|
Packit Service |
a2ae7a |
{ "PICKLE_RECEIVER_INTERFACE" = "0.0.0.0" }
|
|
Packit Service |
a2ae7a |
{ "PICKLE_RECEIVER_PORT" = "2014" }
|
|
Packit Service |
a2ae7a |
}
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let relay_rules_conf = "# You must have exactly one section with 'default = true'
|
|
Packit Service |
a2ae7a |
# Note that all destinations listed must also exist in carbon.conf
|
|
Packit Service |
a2ae7a |
# in the DESTINATIONS setting in the [relay] section
|
|
Packit Service |
a2ae7a |
[default]
|
|
Packit Service |
a2ae7a |
default = true
|
|
Packit Service |
a2ae7a |
destinations = 127.0.0.1:2004:a, 127.0.0.1:2104:b
|
|
Packit Service |
a2ae7a |
"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
test Carbon.lns get relay_rules_conf =
|
|
Packit Service |
a2ae7a |
{ "#comment" = "You must have exactly one section with 'default = true'" }
|
|
Packit Service |
a2ae7a |
{ "#comment" = "Note that all destinations listed must also exist in carbon.conf" }
|
|
Packit Service |
a2ae7a |
{ "#comment" = "in the DESTINATIONS setting in the [relay] section" }
|
|
Packit Service |
a2ae7a |
{ "default"
|
|
Packit Service |
a2ae7a |
{ "default" = "true" }
|
|
Packit Service |
a2ae7a |
{ "destinations" = "127.0.0.1:2004:a, 127.0.0.1:2104:b" }
|
|
Packit Service |
a2ae7a |
}
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let storage_aggregation_conf = "# Aggregation methods for whisper files. Entries are scanned in order,
|
|
Packit Service |
a2ae7a |
# and first match wins. This file is scanned for changes every 60 seconds
|
|
Packit Service |
a2ae7a |
[max]
|
|
Packit Service |
a2ae7a |
pattern = \.max$
|
|
Packit Service |
a2ae7a |
xFilesFactor = 0.1
|
|
Packit Service |
a2ae7a |
aggregationMethod = max
|
|
Packit Service |
a2ae7a |
"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
test Carbon.lns get storage_aggregation_conf =
|
|
Packit Service |
a2ae7a |
{ "#comment" = "Aggregation methods for whisper files. Entries are scanned in order," }
|
|
Packit Service |
a2ae7a |
{ "#comment" = "and first match wins. This file is scanned for changes every 60 seconds" }
|
|
Packit Service |
a2ae7a |
{ "max"
|
|
Packit Service |
a2ae7a |
{ "pattern" = "\.max$" }
|
|
Packit Service |
a2ae7a |
{ "xFilesFactor" = "0.1" }
|
|
Packit Service |
a2ae7a |
{ "aggregationMethod" = "max" }
|
|
Packit Service |
a2ae7a |
}
|