mirror of
https://github.com/distribution/distribution
synced 2024-11-06 19:35:52 +01:00
Test: add test for health/check
Signed-off-by: Hu Keping <hukeping@huawei.com>
This commit is contained in:
parent
faab364ab5
commit
5680d7b8b7
15
health/checks/checks_test.go
Normal file
15
health/checks/checks_test.go
Normal file
@ -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)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user