@@ -22,8 +22,8 @@ func TestPluginInitialize_Injection(t *testing.T) {
2222 name : "测试 Gva插件 注册注入" ,
2323 fields : fields {
2424 Type : TypePluginInitializeV2 ,
25- Path : filepath .Join (global .GVA_CONFIG .AutoCode .Root , global .GVA_CONFIG .AutoCode .Server , "initialize " , "plugin_biz_v2 .go" ),
26- PluginPath : filepath .Join (global .GVA_CONFIG .AutoCode .Root , global .GVA_CONFIG .AutoCode .Server , "plugin" , "gva" , "plugin .go" ),
25+ Path : filepath .Join (global .GVA_CONFIG .AutoCode .Root , global .GVA_CONFIG .AutoCode .Server , "plugin " , "gva" , "plugin .go" ),
26+ PluginPath : filepath .Join (global .GVA_CONFIG .AutoCode .Root , global .GVA_CONFIG .AutoCode .Server , "plugin" , "register .go" ),
2727 ImportPath : `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva"` ,
2828 },
2929 wantErr : false ,
@@ -37,12 +37,12 @@ func TestPluginInitialize_Injection(t *testing.T) {
3737 PluginPath : tt .fields .PluginPath ,
3838 ImportPath : tt .fields .ImportPath ,
3939 }
40- file , err := a .Parse (a . Path , nil )
40+ file , err := a .Parse ("" , nil )
4141 if err != nil {
4242 t .Errorf ("Parse() error = %v, wantErr %v" , err , tt .wantErr )
4343 }
4444 a .Injection (file )
45- err = a .Format (a . Path , nil , file )
45+ err = a .Format ("" , nil , file )
4646 if (err != nil ) != tt .wantErr {
4747 t .Errorf ("Injection() error = %v, wantErr %v" , err , tt .wantErr )
4848 }
@@ -69,8 +69,8 @@ func TestPluginInitialize_Rollback(t *testing.T) {
6969 name : "测试 Gva插件 回滚" ,
7070 fields : fields {
7171 Type : TypePluginInitializeV2 ,
72- Path : filepath .Join (global .GVA_CONFIG .AutoCode .Root , global .GVA_CONFIG .AutoCode .Server , "initialize " , "plugin_biz_v2 .go" ),
73- PluginPath : filepath .Join (global .GVA_CONFIG .AutoCode .Root , global .GVA_CONFIG .AutoCode .Server , "plugin" , "gva" , "plugin .go" ),
72+ Path : filepath .Join (global .GVA_CONFIG .AutoCode .Root , global .GVA_CONFIG .AutoCode .Server , "plugin " , "gva" , "plugin .go" ),
73+ PluginPath : filepath .Join (global .GVA_CONFIG .AutoCode .Root , global .GVA_CONFIG .AutoCode .Server , "plugin" , "register .go" ),
7474 ImportPath : `"github.com/flipped-aurora/gin-vue-admin/server/plugin/gva"` ,
7575 },
7676 wantErr : false ,
@@ -86,12 +86,12 @@ func TestPluginInitialize_Rollback(t *testing.T) {
8686 StructName : "Plugin" ,
8787 PackageName : "gva" ,
8888 }
89- file , err := a .Parse (a . Path , nil )
89+ file , err := a .Parse ("" , nil )
9090 if err != nil {
9191 t .Errorf ("Parse() error = %v, wantErr %v" , err , tt .wantErr )
9292 }
9393 a .Rollback (file )
94- err = a .Format (a . Path , nil , file )
94+ err = a .Format ("" , nil , file )
9595 if (err != nil ) != tt .wantErr {
9696 t .Errorf ("Rollback() error = %v, wantErr %v" , err , tt .wantErr )
9797 }
0 commit comments