aboutsummaryrefslogtreecommitdiffstats
path: root/test/target_test.go
diff options
context:
space:
mode:
authorClément Bénier <clement.benier@iot.bzh>2018-08-14 16:29:07 +0200
committerClément Bénier <clement.benier@iot.bzh>2018-08-21 11:08:36 +0200
commite0e1d75c08ff6187acabca74261ebeb0e0893ede (patch)
tree1bc6f3a033b4db55810d4f00da325f39abdb60d3 /test/target_test.go
parent4c01e5e3fad9455b97519380babdf7e8801d8643 (diff)
tests: better handle websocket client
Change-Id: Iffc7370c52457e6d90e88e30c95b37ae3c60bce3 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
Diffstat (limited to 'test/target_test.go')
-rw-r--r--test/target_test.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/target_test.go b/test/target_test.go
index 696c8fc..1cfaa94 100644
--- a/test/target_test.go
+++ b/test/target_test.go
@@ -70,10 +70,7 @@ func TestTarget(t *testing.T) {
chTerm := make(chan xsapiv1.TerminalOutMsg)
defer close(chTerm)
- sCli, err := NewIoSocketClient(prefixURL, HTTPCli.GetClientID())
- if err != nil {
- t.Fatal(err)
- }
+
sCli.Conn.On(xsapiv1.TerminalOutEvent, func(ev xsapiv1.TerminalOutMsg) {
chTerm <- ev
})
@@ -106,7 +103,7 @@ func TestTarget(t *testing.T) {
flushChannelTerm(chTerm, 50)
/*check that toto file is created*/
- _, err = os.Stat(totoFileCurrent)
+ _, err := os.Stat(totoFileCurrent)
assert.Nil(t, err)
data = []byte("cat " + totoFileCurrent + "\n")