addressing lint issues
This commit is contained in:
parent
2eace1d511
commit
2d73c2d996
|
|
@ -140,12 +140,12 @@ func (c *CopyCommand) RequiresUnpackedFS() bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *CopyCommand) ShouldCacheOutput() bool {
|
func (c *CopyCommand) ShouldCacheOutput() bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// CacheCommand returns true since this command should be cached
|
// CacheCommand returns true since this command should be cached
|
||||||
func (r *CopyCommand) CacheCommand(img v1.Image) DockerCommand {
|
func (c *CopyCommand) CacheCommand(img v1.Image) DockerCommand {
|
||||||
|
|
||||||
return &CachingCopyCommand{
|
return &CachingCopyCommand{
|
||||||
img: img,
|
img: img,
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,9 @@ func setupTestTemp() string {
|
||||||
logrus.Infof("Tempdir: %s", tempDir)
|
logrus.Infof("Tempdir: %s", tempDir)
|
||||||
|
|
||||||
srcPath, err := filepath.Abs("../../integration/context")
|
srcPath, err := filepath.Abs("../../integration/context")
|
||||||
|
if err != nil {
|
||||||
|
logrus.Fatalf("error getting abs path %s", srcPath)
|
||||||
|
}
|
||||||
cperr := filepath.Walk(srcPath,
|
cperr := filepath.Walk(srcPath,
|
||||||
func(path string, info os.FileInfo, err error) error {
|
func(path string, info os.FileInfo, err error) error {
|
||||||
if path != srcPath {
|
if path != srcPath {
|
||||||
|
|
@ -71,16 +74,16 @@ func setupTestTemp() string {
|
||||||
os.MkdirAll(tempDir+"/"+tempPath, 0777)
|
os.MkdirAll(tempDir+"/"+tempPath, 0777)
|
||||||
} else {
|
} else {
|
||||||
out, err := os.Create(tempDir + "/" + tempPath)
|
out, err := os.Create(tempDir + "/" + tempPath)
|
||||||
defer out.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer out.Close()
|
||||||
|
|
||||||
in, err := os.Open(path)
|
in, err := os.Open(path)
|
||||||
defer in.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer in.Close()
|
||||||
|
|
||||||
_, err = io.Copy(out, in)
|
_, err = io.Copy(out, in)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -119,7 +122,6 @@ func TestCopyExecuteCmd(t *testing.T) {
|
||||||
buildArgs := copySetUpBuildArgs()
|
buildArgs := copySetUpBuildArgs()
|
||||||
dest := cfg.WorkingDir + "/" + test.sourcesAndDest[len(test.sourcesAndDest)-1]
|
dest := cfg.WorkingDir + "/" + test.sourcesAndDest[len(test.sourcesAndDest)-1]
|
||||||
logrus.Infof("dest dir: %s", dest)
|
logrus.Infof("dest dir: %s", dest)
|
||||||
//os.RemoveAll(dest)
|
|
||||||
|
|
||||||
err := cmd.ExecuteCommand(cfg, buildArgs)
|
err := cmd.ExecuteCommand(cfg, buildArgs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue