Closed loliee closed 8 months ago
I also tried with mach-regexp
with same kind of issue:
package:
datadog-agent:
installed: true
versions:
and:
- have-len: 1
- match-regexp: '^1:7\.\d+\.\d+(-\d+)?'
goss -g goss/datadog.yml validate -f documentation
Package: datadog-agent: installed: matches expectation: true
Package: datadog-agent: version: matches expectation: {"and":[{"have-len":1},{"match-regexp":"^1:7\\.\\d+\\.\\d+(-\\d+)?"}]}
Total Duration: 0.020s
Count: 5, Failed: 0, Skipped: 0
goss -g goss/datadog.yml validate -f junit
panic: interface conversion: interface {} is nil, not float64
goroutine 1 [running]:
github.com/goss-org/goss/outputs.JUnit.Output({}, {0xc86920, 0xc000012018}, 0xc00026a300?, {{0x11ba608?, 0xc0003105e0?, 0xc000237180?}})
/home/travis/gopath/src/github.com/goss-org/goss/outputs/junit.go:51 +0xe8c
github.com/goss-org/goss.ValidateConfig(0xc0002a0200, 0xc000236f00)
/home/travis/gopath/src/github.com/goss-org/goss/validate.go:142 +0x42a
github.com/goss-org/goss.Validate(0xc0002a0200)
/home/travis/gopath/src/github.com/goss-org/goss/validate.go:111 +0x85
main.main.func1(0xc0002226e0?)
/home/travis/gopath/src/github.com/goss-org/goss/cmd/goss/goss.go:151 +0x25
github.com/urfave/cli.HandleAction({0xaaa1a0?, 0xbddc50?}, 0x8?)
/home/travis/gopath/pkg/mod/github.com/urfave/cli@v1.22.14/app.go:524 +0x50
github.com/urfave/cli.Command.Run({{0xb8f1c5, 0x8}, {0x0, 0x0}, {0xc0002f63b0, 0x1, 0x1}, {0xb95bee, 0xf}, {0x0, ...}, ...}, ...)
/home/travis/gopath/pkg/mod/github.com/urfave/cli@v1.22.14/command.go:175 +0x67b
github.com/urfave/cli.(*App).Run(0xc0002421c0, {0xc000034080, 0x8, 0x8})
/home/travis/gopath/pkg/mod/github.com/urfave/cli@v1.22.14/app.go:277 +0xb87
main.main()
/home/travis/gopath/src/github.com/goss-org/goss/cmd/goss/goss.go:408 +0x2078
Thank you for filing this, I've been able to reproduce locally. My plan is to have this fixed sometime this week.
Describe the bug
I try to use the
contain-substring
matcher with thejunit
,json
formatters but I have the following error:panic: interface conversion: interface {} is nil, not float64
.How To Reproduce
And validate it with
junit
formatter :ℹ️ I also had the same issues with
ip
ressource.Expected Behavior
Finishing without errors like with the
documentation
orrspecish
formatters.Actual Behavior
✅
💥
Environment:
v0.4.2
Linux (Debian 11)