From 71ce5d70959397d667238df8f152bff12210fe53 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 11 May 2018 20:53:50 +0900 Subject: [PATCH] ing --- golang/central-api_test.go | 76 +++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/golang/central-api_test.go b/golang/central-api_test.go index 16b07d4..f793cad 100644 --- a/golang/central-api_test.go +++ b/golang/central-api_test.go @@ -1,60 +1,60 @@ package central_api -import ( - "io/ioutil" - "testing" +// import ( +// "io/ioutil" +// "testing" - "golang.org/x/net/context" - "google.golang.org/grpc" -) +// "golang.org/x/net/context" +// "google.golang.org/grpc" +// ) -func TestTarDis_saveAllTarget(t *testing.T) { +// func TestTarDis_saveAllTarget(t *testing.T) { - contents, _ := ioutil.ReadFile("../dh.json") +// contents, _ := ioutil.ReadFile("../dh.json") - si := &ServerInput{} +// si := &ServerInput{} - si.Target = "TargetDiscoveryService" - si.Method = "saveAllTarget" +// si.Target = "TargetDiscoveryService" +// si.Method = "saveAllTarget" - si.Params = append(si.Params, string(contents)) - si.Params = append(si.Params, "{\"id\":1}") +// si.Params = append(si.Params, string(contents)) +// si.Params = append(si.Params, "{\"id\":1}") - callRPC(t, si) +// callRPC(t, si) -} +// } -func TestRPCNP_readAllByDomain(t *testing.T) { +// func TestRPCNP_readAllByDomain(t *testing.T) { - si := &ServerInput{} +// si := &ServerInput{} - si.Target = "NoAuthProbeService" - si.Method = "readAllByDomain" +// si.Target = "NoAuthProbeService" +// si.Method = "readAllByDomain" - //sp := &ServerParam{} - //sp.IsCollection = false - //sp.Type = "com.loafle.overflow.module.domain.model.Domain" - //sp.Data = "{\"id\":1}" - si.Params = append(si.Params, "{\"id\":1}") +// //sp := &ServerParam{} +// //sp.IsCollection = false +// //sp.Type = "com.loafle.overflow.module.domain.model.Domain" +// //sp.Data = "{\"id\":1}" +// si.Params = append(si.Params, "{\"id\":1}") - callRPC(t, si) -} +// callRPC(t, si) +// } -func callRPC(t *testing.T, si *ServerInput) { +// func callRPC(t *testing.T, si *ServerInput) { - conn, err := grpc.Dial(":50006", grpc.WithInsecure()) +// conn, err := grpc.Dial(":50006", grpc.WithInsecure()) - if err != nil { - t.Log(err) - } +// if err != nil { +// t.Log(err) +// } - client := NewOverflowApiServerClient(conn) +// client := NewOverflowApiServerClient(conn) - out, err := client.Exec(context.Background(), si) - if err != nil { - t.Fatal(err) - } +// out, err := client.Exec(context.Background(), si) +// if err != nil { +// t.Fatal(err) +// } - t.Log(out) +// t.Log(out) -} +// }