mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 01:30:25 +08:00
24fb29a356
* 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
21 lines
318 B
Go
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)
|
|
}
|