Add unit tests for threshold format
This commit is contained in:
parent
9375959b68
commit
562f6e383d
@ -0,0 +1 @@
|
||||
BELOW_THRESHOLD
|
12
testcases/004-disk-low-threshold-format/i3status.conf
Normal file
12
testcases/004-disk-low-threshold-format/i3status.conf
Normal file
@ -0,0 +1,12 @@
|
||||
general {
|
||||
output_format = "none"
|
||||
}
|
||||
|
||||
order += "disk /"
|
||||
|
||||
disk "/" {
|
||||
format = "%used"
|
||||
format_below_threshold = "BELOW_THRESHOLD"
|
||||
low_threshold = 100
|
||||
threshold_type = "percentage_free"
|
||||
}
|
@ -0,0 +1 @@
|
||||
ABOVE_THRESHOLD: 50 °C
|
11
testcases/005-cpu-temp-max-threshold-format/i3status.conf
Normal file
11
testcases/005-cpu-temp-max-threshold-format/i3status.conf
Normal file
@ -0,0 +1,11 @@
|
||||
general {
|
||||
output_format = "none"
|
||||
}
|
||||
|
||||
order += "cpu_temperature 0"
|
||||
|
||||
cpu_temperature 0 {
|
||||
format_above_threshold = "ABOVE_THRESHOLD: %degrees °C"
|
||||
max_threshold = 45
|
||||
path = "testcases/005-cpu-temp-max-threshold-format/temp1_input"
|
||||
}
|
1
testcases/005-cpu-temp-max-threshold-format/temp1_input
Normal file
1
testcases/005-cpu-temp-max-threshold-format/temp1_input
Normal file
@ -0,0 +1 @@
|
||||
50000
|
@ -0,0 +1 @@
|
||||
ABOVE_THRESHOLD
|
10
testcases/006-cpu-usage-max-threshold-format/i3status.conf
Normal file
10
testcases/006-cpu-usage-max-threshold-format/i3status.conf
Normal file
@ -0,0 +1,10 @@
|
||||
general {
|
||||
output_format = "none"
|
||||
}
|
||||
|
||||
order += "cpu_usage"
|
||||
|
||||
cpu_usage {
|
||||
format_above_threshold = "ABOVE_THRESHOLD"
|
||||
max_threshold = -1
|
||||
}
|
@ -0,0 +1 @@
|
||||
ABOVE_THRESHOLD
|
@ -0,0 +1,10 @@
|
||||
general {
|
||||
output_format = "none"
|
||||
}
|
||||
|
||||
order += "cpu_usage"
|
||||
|
||||
cpu_usage {
|
||||
format_above_threshold = "ABOVE_THRESHOLD"
|
||||
max_threshold = -1
|
||||
}
|
@ -0,0 +1 @@
|
||||
ABOVE_THRESHOLD
|
10
testcases/008-load-max-threshold-format/i3status.conf
Normal file
10
testcases/008-load-max-threshold-format/i3status.conf
Normal file
@ -0,0 +1,10 @@
|
||||
general {
|
||||
output_format = "none"
|
||||
}
|
||||
|
||||
order += "load"
|
||||
|
||||
load {
|
||||
format_above_threshold = "ABOVE_THRESHOLD"
|
||||
max_threshold = -1
|
||||
}
|
Loading…
Reference in New Issue
Block a user