2020package common
2121
2222import (
23+ "fmt"
2324 "testing"
2425 "time"
2526
2627 "github.com/facebook/openbmc/tools/flashy/lib/fileutils"
2728 "github.com/facebook/openbmc/tools/flashy/lib/step"
2829 "github.com/facebook/openbmc/tools/flashy/lib/utils"
29- "github.com/pkg/errors"
3030)
3131
3232type GlobAllReturnType struct {
@@ -79,7 +79,7 @@ func TestTruncateLogs(t *testing.T) {
7979 resolvedFilePatterns : []GlobAllReturnType {
8080 {
8181 nil ,
82- errors .Errorf ("resolveFilePatterns Error" ),
82+ fmt .Errorf ("resolveFilePatterns Error" ),
8383 },
8484 {
8585 []string {"/tmp/test" },
@@ -88,7 +88,7 @@ func TestTruncateLogs(t *testing.T) {
8888 },
8989 removeFileErr : nil ,
9090 truncateFileErr : nil ,
91- want : step.ExitSafeToReboot {Err : errors .Errorf ("Unable to resolve file patterns '%v': resolveFilePatterns Error" , deleteLogFilePatterns )},
91+ want : step.ExitSafeToReboot {Err : fmt .Errorf ("Unable to resolve file patterns '%v': resolveFilePatterns Error" , deleteLogFilePatterns )},
9292 },
9393 {
9494 name : "Resolve file patterns error (2)" ,
@@ -99,12 +99,12 @@ func TestTruncateLogs(t *testing.T) {
9999 },
100100 {
101101 nil ,
102- errors .Errorf ("resolveFilePatterns Error" ),
102+ fmt .Errorf ("resolveFilePatterns Error" ),
103103 },
104104 },
105105 removeFileErr : nil ,
106106 truncateFileErr : nil ,
107- want : step.ExitSafeToReboot {Err : errors .Errorf ("Unable to resolve file patterns '%v': resolveFilePatterns Error" , deleteLogFilePatterns )},
107+ want : step.ExitSafeToReboot {Err : fmt .Errorf ("Unable to resolve file patterns '%v': resolveFilePatterns Error" , deleteLogFilePatterns )},
108108 },
109109 }
110110
0 commit comments