Modify TestDoExecuteRemoteDevice TC 58/203358/1
authorjw_wonny.cha <jw_wonny.cha@samsung.com>
Fri, 12 Apr 2019 05:03:08 +0000 (14:03 +0900)
committerjw_wonny.cha <jw_wonny.cha@samsung.com>
Fri, 12 Apr 2019 05:03:08 +0000 (14:03 +0900)
Change-Id: I8970bbeeb1eda12be5bc5a722c4d6abd964c7780
Signed-off-by: jw_wonny.cha <jw_wonny.cha@samsung.com>
src/restapi/httpclient/http_sender_test.go
src/restapi/httpclient/internal_test.go
src/servicemgr/service_execution.go
src/servicemgr/servicemgr.go

index d2d0c29..45e45f6 100755 (executable)
@@ -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"
index 42ed975..2feb0d4 100644 (file)
@@ -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 {
index 99ac8a0..6c88452 100755 (executable)
@@ -1,5 +1,3 @@
-package servicemgr
-
 /*******************************************************************************
  * Copyright 2019 Samsung Electronics All Rights Reserved.
  *
@@ -17,6 +15,8 @@ package servicemgr
  *
  *******************************************************************************/
 
+package servicemgr
+
 import (
        "log"
        "os"
index e1d9868..52c71f8 100755 (executable)
@@ -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"