diff options
Diffstat (limited to 'test/target_test.go')
-rw-r--r-- | test/target_test.go | 7 |
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") |