Resolving comments

This commit is contained in:
Don McCasland 2019-10-08 12:19:20 -07:00
parent e5da55d4cd
commit 27020f23b9
No known key found for this signature in database
GPG Key ID: 2B332A542CE5FE1B
2 changed files with 4 additions and 5 deletions

View File

@ -52,8 +52,7 @@ func setupTestTemp() string {
if err != nil {
logrus.Fatalf("error creating temp dir %s", err)
}
//defer os.RemoveAll(tempDir)
logrus.Infof("Tempdir: %s", tempDir)
logrus.Debugf("Tempdir: %s", tempDir)
srcPath, err := filepath.Abs("../../integration/context")
if err != nil {
@ -101,6 +100,7 @@ func setupTestTemp() string {
}
func TestCopyExecuteCmd(t *testing.T) {
tempDir := setupTestTemp()
defer os.RemoveAll(tempDir)
cfg := &v1.Config{
Cmd: nil,
@ -121,7 +121,6 @@ func TestCopyExecuteCmd(t *testing.T) {
buildArgs := copySetUpBuildArgs()
dest := cfg.WorkingDir + "/" + test.sourcesAndDest[len(test.sourcesAndDest)-1]
logrus.Infof("dest dir: %s", dest)
err := cmd.ExecuteCommand(cfg, buildArgs)
if err != nil {
@ -143,7 +142,7 @@ func TestCopyExecuteCmd(t *testing.T) {
t.Error()
}
for _, file := range files {
logrus.Infof("file: %v", file.Name())
logrus.Debugf("file: %v", file.Name())
dirList = append(dirList, file.Name())
}
} else {

View File

@ -192,7 +192,7 @@ func extractFile(dest string, hdr *tar.Header, tr io.Reader) error {
// or a file was copied over a directory prior to now
fi, err := os.Stat(dir)
if os.IsNotExist(err) || !fi.IsDir() {
logrus.Infof("base %s for file %s does not exist. Creating.", base, path)
logrus.Debugf("base %s for file %s does not exist. Creating.", base, path)
if err := os.MkdirAll(dir, 0755); err != nil {
return err
}