mirror of
https://github.com/appleboy/drone-scp.git
synced 2026-06-04 18:23:59 +08:00
refactor: refactor testing functions for consistency
- Replace `trimPath` with `trimValues` in `TestTrimElement` function Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
+2
-2
@@ -435,12 +435,12 @@ func TestIgnoreList(t *testing.T) {
|
||||
assert.Nil(t, err)
|
||||
|
||||
// check file exist
|
||||
if _, err := os.Stat(filepath.Join(u.HomeDir, "ignore/c.txt")); err == nil {
|
||||
if _, err := os.Stat(filepath.Join(u.HomeDir, "ignore/c.txt")); !os.IsNotExist(err) {
|
||||
t.Fatal("c.txt file exist")
|
||||
}
|
||||
|
||||
// check file exist
|
||||
if _, err := os.Stat(filepath.Join(u.HomeDir, "ignore/e.txt")); err == nil {
|
||||
if _, err := os.Stat(filepath.Join(u.HomeDir, "ignore/e.txt")); !os.IsNotExist(err) {
|
||||
t.Fatal("c.txt file exist")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user