5680d7b8b7
Signed-off-by: Hu Keping <hukeping@huawei.com>
15 lines
322 B
Go
15 lines
322 B
Go
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)
|
|
}
|
|
}
|