From 1263a13b46feb1577ecd765a573599c97c2c0e0d Mon Sep 17 00:00:00 2001 From: "jw_wonny.cha" Date: Fri, 12 Apr 2019 14:03:08 +0900 Subject: [PATCH] Modify TestDoExecuteRemoteDevice TC Change-Id: I8970bbeeb1eda12be5bc5a722c4d6abd964c7780 Signed-off-by: jw_wonny.cha --- src/restapi/httpclient/http_sender_test.go | 33 ++++++++++++++--------------- src/restapi/httpclient/internal_test.go | 10 ++++----- src/servicemgr/service_execution.go | 4 ++-- src/servicemgr/servicemgr.go | 34 +++++++++++++++--------------- 4 files changed, 39 insertions(+), 42 deletions(-) diff --git a/src/restapi/httpclient/http_sender_test.go b/src/restapi/httpclient/http_sender_test.go index d2d0c29..45e45f6 100755 --- a/src/restapi/httpclient/http_sender_test.go +++ b/src/restapi/httpclient/http_sender_test.go @@ -1,21 +1,20 @@ -package httpclient - /******************************************************************************* - * Copyright 2019 Samsung Electronics All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - *******************************************************************************/ +* Copyright 2019 Samsung Electronics All Rights Reserved. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*******************************************************************************/ +package httpclient import ( "encoding/json" diff --git a/src/restapi/httpclient/internal_test.go b/src/restapi/httpclient/internal_test.go index 42ed975..2feb0d4 100644 --- a/src/restapi/httpclient/internal_test.go +++ b/src/restapi/httpclient/internal_test.go @@ -1,5 +1,3 @@ -package httpclient_test - /******************************************************************************* * Copyright 2019 Samsung Electronics All Rights Reserved. * @@ -17,6 +15,8 @@ package httpclient_test * *******************************************************************************/ +package httpclient_test + import ( "fmt" "log" @@ -27,7 +27,6 @@ import ( "scoringmgr" "securemgr" "servicemgr" - "strconv" "strings" "testing" "time" @@ -78,8 +77,7 @@ func TestDoExecuteRemoteDevice(t *testing.T) { appInfo := make(map[string]interface{}) appInfo["ServiceName"] = serviceName - appInfo["NotificationTargetURL"] = httpclient.ConstPrefixHTTP + - targetRemoteDeviceAddr + ":" + strconv.Itoa(httpclient.ConstWellknownPort) + appInfo["NotificationTargetURL"] = targetRemoteDeviceAddr err := httpclient.DoExecuteRemoteDevice(appInfo, targetRemoteDeviceAddr) @@ -131,7 +129,7 @@ func TestDoGetScoreRemoteDevice(t *testing.T) { //working on time.Sleep(time.Duration(3) * time.Second) - scoreValue, err := httpclient.DoGetScoreRemoteDevice("ls", targetRemoteDeviceAddr) + scoreValue, err := httpclient.DoGetScoreRemoteDevice(serviceName, targetRemoteDeviceAddr) log.Printf("scorevalue : %f\n", scoreValue) if err != nil { diff --git a/src/servicemgr/service_execution.go b/src/servicemgr/service_execution.go index 99ac8a0..6c88452 100755 --- a/src/servicemgr/service_execution.go +++ b/src/servicemgr/service_execution.go @@ -1,5 +1,3 @@ -package servicemgr - /******************************************************************************* * Copyright 2019 Samsung Electronics All Rights Reserved. * @@ -17,6 +15,8 @@ package servicemgr * *******************************************************************************/ +package servicemgr + import ( "log" "os" diff --git a/src/servicemgr/servicemgr.go b/src/servicemgr/servicemgr.go index e1d9868..52c71f8 100755 --- a/src/servicemgr/servicemgr.go +++ b/src/servicemgr/servicemgr.go @@ -1,21 +1,21 @@ -package servicemgr - /******************************************************************************* - * Copyright 2019 Samsung Electronics All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - *******************************************************************************/ +* Copyright 2019 Samsung Electronics All Rights Reserved. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*******************************************************************************/ + +package servicemgr import ( "common" -- 2.7.4