reed-alert/test/test.lisp

28 lines
1.2 KiB
Common Lisp
Raw Permalink Normal View History

2019-01-15 16:20:42 +00:00
(setf *tries* 2)
2019-01-25 10:12:15 +00:00
(setf *reminder* 5)
2019-01-15 16:20:42 +00:00
2023-06-28 08:55:17 +00:00
(alert notification "echo '%state% %function% %params% %result% %date%'")
2019-01-15 16:20:42 +00:00
;; check for /tmp/ disk usage
;; create a big file to increase size
(=> notification disk-usage :path "/tmp" :limit 5 :reminder 2)
2019-01-25 10:12:15 +00:00
(=> notification disk-usage :path "/" :limit 1 :reminder 2)
(=> notification disk-usage :path "/" :limit 1 :reminder 2)
(=> notification disk-usage :path "/" :limit 1 :reminder 2)
(=> notification disk-usage :path "/" :limit 1 :reminder 2)
(=> notification disk-usage :path "/" :limit 1 :reminder 2)
(=> notification disk-usage :path "/" :limit 1 :reminder 2)
2019-07-09 14:55:01 +00:00
(and
(=> notification disk-usage :path "/" :limit 99 :reminder 2 :desc "always OK")
(=> notification disk-usage :path "/" :limit 1 :reminder 2 :desc "always error")
(=> notification disk-usage :path "/" :limit 1 :reminder 2 :desc "always error, should not be displayed"))
(or
(=> notification disk-usage :path "/" :limit 1 :reminder 2 :desc "always error, should be followed by always ok")
(=> notification disk-usage :path "/" :limit 99 :reminder 2 :desc "always OK"))
2019-07-11 08:06:26 +00:00
(=> notification write-to-file :path "/tmp/hello.txt")
(=> notification write-to-file :path "/tmp/hello2.txt" :text "hi")