mirror of
https://github.com/ManyakRus/crud_generator.git
synced 2024-11-21 05:05:52 +02:00
сделал objects
This commit is contained in:
parent
34b2cd6b27
commit
62e30b3217
@ -22,7 +22,7 @@ func (crud Crud_GRPC) ReadObject(m *object_lawsuit_status_types.ObjectLawsuitSta
|
||||
grpc_client_func.Func_Connect_GRPC_NRPC.Connect_GRPC_NRPC()
|
||||
|
||||
// подготовка запроса
|
||||
var versionModel = crud.GetVersionModel()
|
||||
var versionModel = m.GetStructVersion()
|
||||
|
||||
Request := &grpc_proto.RequestId{}
|
||||
Request.ID = ProtoFromInt(m.ID)
|
||||
|
@ -3,6 +3,7 @@ package grpc_lawsuit_status_types
|
||||
import (
|
||||
"github.com/ManyakRus/starter/config_main"
|
||||
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/network/grpc/grpc_client"
|
||||
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/crud_func"
|
||||
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/network/grpc/grpc_client/grpc_lawsuit_status_types"
|
||||
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/objects/object_lawsuit_status_types"
|
||||
"testing"
|
||||
@ -18,11 +19,7 @@ func TestReadObject(t *testing.T) {
|
||||
Otvet.ID = Postgres_ID_Test
|
||||
err := crud.ReadObject(&Otvet)
|
||||
|
||||
if err != nil {
|
||||
if err != nil && crud_func.IsRecordNotFound(err) == false {
|
||||
t.Error("TestReadObject() error: ", err)
|
||||
}
|
||||
|
||||
if IntFromAlias(Otvet.ID) == 0 {
|
||||
t.Error("TestReadObject() error: ID =0")
|
||||
}
|
||||
}
|
||||
|
@ -170,6 +170,10 @@ func CreateFiles_ReadObject_Test(Table1 *types.Table) error {
|
||||
GRPClientTableURL := create_files.Find_GRPCClientTableURL(Table1.Name)
|
||||
TextGRPCClient = create_files.AddImport(TextGRPCClient, GRPClientTableURL)
|
||||
|
||||
//
|
||||
CrudFuncURL := create_files.Find_CrudFuncURL()
|
||||
TextGRPCClient = create_files.AddImport(TextGRPCClient, CrudFuncURL)
|
||||
|
||||
//GRPClientFuncURL := create_files.Find_GRPCClient_func_URL()
|
||||
//TextGRPCClient = create_files.AddImport(TextGRPCClient, GRPClientFuncURL)
|
||||
|
||||
|
@ -181,6 +181,7 @@ func CreateFiles_ReadAll_Test(Table1 *types.Table) error {
|
||||
ProtoURL := create_files.Find_ProtoURL()
|
||||
TextGRPCServer = create_files.AddImport(TextGRPCServer, ProtoURL)
|
||||
|
||||
//
|
||||
CrudFuncURL := create_files.Find_CrudFuncURL()
|
||||
TextGRPCServer = create_files.AddImport(TextGRPCServer, CrudFuncURL)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user