From 65eadd89c3a460fa042637e881d1b6a222e22a96 Mon Sep 17 00:00:00 2001 From: geek Date: Fri, 9 Jun 2017 17:01:09 +0900 Subject: [PATCH 1/4] test code --- proxy/sensor/sensor_test.go | 17 +++++++++++++++++ proxy/sensorItem/sensorItem.go | 2 +- proxy/sensorItem/sensorItem_test.go | 17 +++++++++++++++++ .../sensorItemMapping/sensorItemMapping_test.go | 16 ++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/proxy/sensor/sensor_test.go b/proxy/sensor/sensor_test.go index 75facdc..637393f 100644 --- a/proxy/sensor/sensor_test.go +++ b/proxy/sensor/sensor_test.go @@ -1 +1,18 @@ package sensor + +import ( + "encoding/json" + "git.loafle.net/overflow/overflow_proxy_service/proxy/target" + "testing" +) + +func TestSensorService_List(t *testing.T) { + + ts := &target.Target{} + ts.Id = json.Number("1") + + ss := NewSensorService() + res, _ := ss.List(ts) + + t.Log(res) +} diff --git a/proxy/sensorItem/sensorItem.go b/proxy/sensorItem/sensorItem.go index 63aebdd..504b591 100644 --- a/proxy/sensorItem/sensorItem.go +++ b/proxy/sensorItem/sensorItem.go @@ -2,10 +2,10 @@ package sensorItem import ( "encoding/json" - "git.loafle.net/overflow/crawler_go" "git.loafle.net/overflow/overflow_proxy_service/proxy/sensorItemCategory" "git.loafle.net/overflow/overflow_proxy_service/proxy/utils" "github.com/golang/protobuf/ptypes/timestamp" + "git.loafle.net/overflow/overflow_proxy_service/proxy/crawler" ) type SensorItem struct { diff --git a/proxy/sensorItem/sensorItem_test.go b/proxy/sensorItem/sensorItem_test.go index 558ff1f..ce46512 100644 --- a/proxy/sensorItem/sensorItem_test.go +++ b/proxy/sensorItem/sensorItem_test.go @@ -1 +1,18 @@ package sensorItem + +import ( + "encoding/json" + "git.loafle.net/overflow/overflow_proxy_service/proxy/crawler" + "testing" +) + +func TestSensorItemService_List(t *testing.T) { + + cr := &crawler.Crawler{} + cr.Id = json.Number("1") + sis := NewSensorItemService() + + res, _ := sis.List(cr) + + t.Log(res) +} diff --git a/proxy/sensorItemMapping/sensorItemMapping_test.go b/proxy/sensorItemMapping/sensorItemMapping_test.go index 191a467..9d6488b 100644 --- a/proxy/sensorItemMapping/sensorItemMapping_test.go +++ b/proxy/sensorItemMapping/sensorItemMapping_test.go @@ -1 +1,17 @@ package sensorItemMapping + +import ( + "encoding/json" + "git.loafle.net/overflow/overflow_proxy_service/proxy/sensor" + "testing" +) + +func TestSensorItemMappingService_List(t *testing.T) { + s := &sensor.Sensor{} + s.Id = json.Number("1") + + sims := NewSensorItemMappingService() + res, _ := sims.List(s) + + t.Log(res) +} From 1c28f073ed077ebab7ecbefd993ade7cbe7b6b70 Mon Sep 17 00:00:00 2001 From: geek Date: Fri, 9 Jun 2017 17:01:33 +0900 Subject: [PATCH 2/4] test code --- proxy/sensorItem/sensorItem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/sensorItem/sensorItem.go b/proxy/sensorItem/sensorItem.go index 504b591..26027bc 100644 --- a/proxy/sensorItem/sensorItem.go +++ b/proxy/sensorItem/sensorItem.go @@ -2,10 +2,10 @@ package sensorItem import ( "encoding/json" + "git.loafle.net/overflow/overflow_proxy_service/proxy/crawler" "git.loafle.net/overflow/overflow_proxy_service/proxy/sensorItemCategory" "git.loafle.net/overflow/overflow_proxy_service/proxy/utils" "github.com/golang/protobuf/ptypes/timestamp" - "git.loafle.net/overflow/overflow_proxy_service/proxy/crawler" ) type SensorItem struct { From c0acf6d79ccfebe9a402a83a4cdeac8f5da88883 Mon Sep 17 00:00:00 2001 From: geek Date: Fri, 9 Jun 2017 17:20:04 +0900 Subject: [PATCH 3/4] ee --- proxy/sensorItem/sensorItem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/sensorItem/sensorItem.go b/proxy/sensorItem/sensorItem.go index 26027bc..67baada 100644 --- a/proxy/sensorItem/sensorItem.go +++ b/proxy/sensorItem/sensorItem.go @@ -5,7 +5,7 @@ import ( "git.loafle.net/overflow/overflow_proxy_service/proxy/crawler" "git.loafle.net/overflow/overflow_proxy_service/proxy/sensorItemCategory" "git.loafle.net/overflow/overflow_proxy_service/proxy/utils" - "github.com/golang/protobuf/ptypes/timestamp" + "git.loafle.net/overflow/commons_go/model/timestamp" ) type SensorItem struct { From e505d71838ad1abb5c0ef67dae0c578bb8b65d8c Mon Sep 17 00:00:00 2001 From: geek Date: Fri, 9 Jun 2017 17:20:17 +0900 Subject: [PATCH 4/4] ee --- proxy/sensorItem/sensorItem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/sensorItem/sensorItem.go b/proxy/sensorItem/sensorItem.go index 67baada..0ad016e 100644 --- a/proxy/sensorItem/sensorItem.go +++ b/proxy/sensorItem/sensorItem.go @@ -2,10 +2,10 @@ package sensorItem import ( "encoding/json" + "git.loafle.net/overflow/commons_go/model/timestamp" "git.loafle.net/overflow/overflow_proxy_service/proxy/crawler" "git.loafle.net/overflow/overflow_proxy_service/proxy/sensorItemCategory" "git.loafle.net/overflow/overflow_proxy_service/proxy/utils" - "git.loafle.net/overflow/commons_go/model/timestamp" ) type SensorItem struct {