зеркало из https://github.com/Azure/draft-classic.git
gofmtd pack.go and pack_test.go
This commit is contained in:
Родитель
bbbf5cc658
Коммит
b3b3e88d49
|
@ -2,12 +2,12 @@ package pack
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"k8s.io/helm/pkg/proto/hapi/chart"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"k8s.io/helm/pkg/proto/hapi/chart"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
const testDockerfile = `FROM nginx:latest
|
||||
|
@ -32,8 +32,8 @@ func TestSaveDir(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Files: map[string]PackFile{
|
||||
dockerfileName: PackFile{ioutil.NopCloser(bytes.NewBufferString(testDockerfile)), dockerPerm},
|
||||
TasksFileName: PackFile{ioutil.NopCloser(bytes.NewBufferString(testTasksFile)), tasksPerm},
|
||||
dockerfileName: {ioutil.NopCloser(bytes.NewBufferString(testDockerfile)), dockerPerm},
|
||||
TasksFileName: {ioutil.NopCloser(bytes.NewBufferString(testTasksFile)), tasksPerm},
|
||||
},
|
||||
}
|
||||
dir, err := ioutil.TempDir("", "draft-pack-test")
|
||||
|
@ -59,7 +59,6 @@ func TestSaveDir(t *testing.T) {
|
|||
t.Fail()
|
||||
}
|
||||
|
||||
|
||||
tasksPath := filepath.Join(dir, TargetTasksFileName)
|
||||
fInfo, err = os.Stat(tasksPath)
|
||||
if err != nil {
|
||||
|
@ -91,7 +90,7 @@ func TestSaveDirDockerfileExistsInAppDir(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Files: map[string]PackFile{
|
||||
dockerfileName: PackFile{ioutil.NopCloser(bytes.NewBufferString(testDockerfile)), 664},
|
||||
dockerfileName: {ioutil.NopCloser(bytes.NewBufferString(testDockerfile)), 664},
|
||||
},
|
||||
}
|
||||
dir, err := ioutil.TempDir("", "draft-pack-test")
|
||||
|
|
Загрузка…
Ссылка в новой задаче