add readfile e2e test

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2022-05-24 07:50:08 +08:00
committed by yxxhero
parent 70b874a596
commit 33c66a6f46
7 changed files with 44 additions and 3 deletions
+4
View File
@@ -172,6 +172,10 @@ func (c *Context) ReadFile(filename string) (string, error) {
path = filepath.Join(c.basePath, filename)
}
if c.readFile == nil {
return "", fmt.Errorf("readFile is not implemented")
}
bytes, err := c.readFile(path)
if err != nil {
return "", err