mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
add original msg to json errors on socket
This commit is contained in:
parent
5c55178e34
commit
3fd36116f9
2 changed files with 5 additions and 5 deletions
|
@ -193,7 +193,7 @@ func (s *server) readSocket() {
|
||||||
// unmarshal the JSON into a struct
|
// unmarshal the JSON into a struct
|
||||||
sams, err := s.convertBytesToSAMs(readBytes)
|
sams, err := s.convertBytesToSAMs(readBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
er := fmt.Errorf("error: malformed json received on socket: %v", err)
|
er := fmt.Errorf("error: malformed json received on socket: %s\n %v", readBytes, err)
|
||||||
s.errorKernel.errSend(s.processInitial, Message{}, er)
|
s.errorKernel.errSend(s.processInitial, Message{}, er)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@ func TestStewardServer(t *testing.T) {
|
||||||
DefaultMessageTimeout: 3,
|
DefaultMessageTimeout: 3,
|
||||||
EnableSocket: true,
|
EnableSocket: true,
|
||||||
// AllowEmptySignature: true,
|
// AllowEmptySignature: true,
|
||||||
|
EnableDebug: true,
|
||||||
|
|
||||||
StartSubREQCliCommand: true,
|
StartSubREQCliCommand: true,
|
||||||
StartSubREQCliCommandCont: true,
|
StartSubREQCliCommandCont: true,
|
||||||
|
@ -328,8 +329,7 @@ func checkREQTailFileTest(stewardServer *server, conf *Configuration, t *testing
|
||||||
|
|
||||||
file := filepath.Join(wd, "test.file")
|
file := filepath.Join(wd, "test.file")
|
||||||
|
|
||||||
s := `
|
s := `[
|
||||||
[
|
|
||||||
{
|
{
|
||||||
"directory": "tail-files",
|
"directory": "tail-files",
|
||||||
"fileName": "fileName.result",
|
"fileName": "fileName.result",
|
||||||
|
@ -340,8 +340,8 @@ func checkREQTailFileTest(stewardServer *server, conf *Configuration, t *testing
|
||||||
"retries":3,
|
"retries":3,
|
||||||
"methodTimeout": 10
|
"methodTimeout": 10
|
||||||
}
|
}
|
||||||
]
|
]`
|
||||||
`
|
|
||||||
writeToSocketTest(conf, s, t)
|
writeToSocketTest(conf, s, t)
|
||||||
|
|
||||||
// time.Sleep(time.Second * 5)
|
// time.Sleep(time.Second * 5)
|
||||||
|
|
Loading…
Reference in a new issue