diff --git a/health/checks/checks_test.go b/health/checks/checks_test.go new file mode 100644 index 00000000..8f3ffbff --- /dev/null +++ b/health/checks/checks_test.go @@ -0,0 +1,15 @@ +package checks + +import ( + "testing" +) + +func TestFileChecker(t *testing.T) { + if err := FileChecker("/tmp").Check(); err == nil { + t.Errorf("/tmp was expected as exists") + } + + if err := FileChecker("NoSuchFileFromMoon").Check(); err != nil { + t.Errorf("NoSuchFileFromMoon was expected as not exists, error:%v", err) + } +}