forked from goffee/goffee
rewrite
This commit is contained in:
parent
c97afa7564
commit
7f4e3c39da
4 changed files with 44 additions and 9 deletions
|
|
@ -36,7 +36,7 @@ func TestDownloadConfig(t *testing.T) {
|
|||
func TestDownloadGoCondor(t *testing.T) {
|
||||
// Prepare
|
||||
newCmd := CmdNew{}
|
||||
fileName := "gocondor_temp_" + randstr.Hex(8) + ".tar.gz"
|
||||
fileName := "cup_temp_" + randstr.Hex(8) + ".tar.gz"
|
||||
server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
|
||||
res, err := os.ReadFile("testdata/gocondor.tar.gz")
|
||||
if err != nil {
|
||||
|
|
@ -78,8 +78,8 @@ func TestIsUpdatedRequired(t *testing.T) {
|
|||
func TestUnpack(t *testing.T) {
|
||||
// Prepare
|
||||
cn := CmdNew{}
|
||||
filepath := "./testdata/gocondor.tar.gz"
|
||||
folderName := "gocondor-0.3-alpha.6"
|
||||
filepath := "./testdata/cup.tar.gz"
|
||||
folderName := "cup-0.3-alpha.6"
|
||||
destPath := os.TempDir()
|
||||
os.RemoveAll(destPath + "/" + folderName)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue