refactor file|path (#1409)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
10
tools/goctl/util/env/env_test.go
vendored
10
tools/goctl/util/env/env_test.go
vendored
@@ -9,7 +9,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/util"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/util/pathx"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/vars"
|
||||
)
|
||||
|
||||
@@ -19,7 +19,7 @@ func TestLookUpGo(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
assert.True(t, util.FileExists(xGo))
|
||||
assert.True(t, pathx.FileExists(xGo))
|
||||
output, errOutput, err := execCommand(xGo, "version")
|
||||
if err != nil {
|
||||
return
|
||||
@@ -37,7 +37,7 @@ func TestLookUpProtoc(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
assert.True(t, util.FileExists(xProtoc))
|
||||
assert.True(t, pathx.FileExists(xProtoc))
|
||||
output, errOutput, err := execCommand(xProtoc, "--version")
|
||||
if err != nil {
|
||||
return
|
||||
@@ -54,7 +54,7 @@ func TestLookUpProtocGenGo(t *testing.T) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
assert.True(t, util.FileExists(xProtocGenGo))
|
||||
assert.True(t, pathx.FileExists(xProtocGenGo))
|
||||
}
|
||||
|
||||
func TestLookPath(t *testing.T) {
|
||||
@@ -62,7 +62,7 @@ func TestLookPath(t *testing.T) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
assert.True(t, util.FileExists(xGo))
|
||||
assert.True(t, pathx.FileExists(xGo))
|
||||
}
|
||||
|
||||
func TestCanExec(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user