go-zero/tools/goctl/rpc/generator/prototmpl_test.go
Keson 24fb29a356
patch model&rpc (#207)
* change column to read from information_schema

* reactor generate mode from datasource

* reactor generate mode from datasource

* add primary key check logic

* resolve rebase conflicts

* add naming style

* add filename test case

* resolve rebase conflicts

* reactor test

* add test case

* change shell script to makefile

* update rpc new

* update gen_test.go

* format code

* format code

* update test

* generates alias
2020-11-18 15:32:53 +08:00

21 lines
318 B
Go

package generator
import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func TestProtoTmpl(t *testing.T) {
_ = Clean()
// exists dir
err := ProtoTmpl(t.TempDir())
assert.Nil(t, err)
// not exist dir
dir := filepath.Join(t.TempDir(), "test")
err = ProtoTmpl(dir)
assert.Nil(t, err)
}