Closed 0rax closed 6 years ago
When trying to validate values from a document returned as a JSON Document ([]interface{}), aragorn panic with the following error:
[]interface{}
panic: interface conversion: interface {} is []interface {}, not map[string]interface {} goroutine 1 [running]: github.com/blippar/aragorn/vendor/github.com/jmoiron/jsonq.NewQuery(...) /Users/orax/Projects/Go/src/github.com/blippar/aragorn/vendor/github.com/jmoiron/jsonq/jsonq.go:85 github.com/blippar/aragorn/testsuite/httpexpect.(*Response).ContainsJSONValues(0xc42032c190, 0xc4201cc930) /Users/orax/Projects/Go/src/github.com/blippar/aragorn/testsuite/httpexpect/response.go:103 +0x43b github.com/blippar/aragorn/testsuite/httpexpect.(*Suite).runTest(0xc4202e8540, 0xc4201fa780, 0x1971168, 0xc4201fb4a0, 0x0, 0x0) /Users/orax/Projects/Go/src/github.com/blippar/aragorn/testsuite/httpexpect/httpexpect.go:123 +0x4c2 github.com/blippar/aragorn/testsuite/httpexpect.(*Suite).runTestWithRetry(0xc4202e8540, 0xc4201fa780, 0x1971168, 0xc4201fb4a0)
This issue comes from the jsonq library itself (see jsonq.go:85), it seems that this is a know issue (see https://github.com/jmoiron/jsonq/issues/12 & https://github.com/jmoiron/jsonq/issues/5) which as not yet been fixed.
jsonq
jsonq.go:85
Fixed by #3
When trying to validate values from a document returned as a JSON Document (
[]interface{}
), aragorn panic with the following error:This issue comes from the
jsonq
library itself (seejsonq.go:85
), it seems that this is a know issue (see https://github.com/jmoiron/jsonq/issues/12 & https://github.com/jmoiron/jsonq/issues/5) which as not yet been fixed.