viant / assertly Goto Github PK
View Code? Open in Web Editor NEWArbitrary datastructure validation
License: Apache License 2.0
Arbitrary datastructure validation
License: Apache License 2.0
Hi there,
I'm working with @creekorful to package this project into Debian.
Debian build system usually run go test after building the package, so I find a few warnings (log shows fails, but result is Passed).
Here's the log:
=== RUN TestAssertMap
2020/06/19 11:36:03 failed to apply directive to actual actual value: parsing time "99-99-99" as "2006-01-": cannot parse "9-99" as "2006"
--- PASS: TestAssertMap (0.00s)
=== RUN TestAssertStructureWithIndexDirective
[/]:2.name: actual(string): 'name 22' was not equal (string) 'name 2'
Passed: 5
Failed: 1
--- PASS: TestAssertStructureWithIndexDirective (0.00s)
=== RUN TestAssertNumericPrecission
--- PASS: TestAssertNumericPrecission (0.00s)
=== RUN TestAssertCoalesceWithZero
[/]:[0].tac: actual(): '' was not equal (int) '0'
Passed: 0
Failed: 1
--- PASS: TestAssertCoalesceWithZero (0.00s)
=== RUN TestAssertCaseSensitive
[/]:[0].tac: actual(string): 'abc' was not equal (string) 'ABC'
Passed: 0
Failed: 1
--- PASS: TestAssertCaseSensitive (0.00s)
=== RUN TestAssertMultiIndexBy
--- PASS: TestAssertMultiIndexBy (0.00s)
=== RUN TestAssertStructureWithSource
[/]:2.name: actual(string): 'name 22' was not equal (string) 'name 2'
Passed: 5
Failed: 1
--- PASS: TestAssertStructureWithSource (0.00s)
Full build log can be referenced:
Thank you!
Hi there,
I'm working with @creekorful to package this project into Debian.
Debian build system usually run go test after building the package, so I find TestAssertPath_Directive fails.
Here's the log:
=== RUN TestAssertPath_Directive
directive_test.go:192 (TestAssertPath_Directive)
[/]:[1].SubPath: actual(string): 'group1.field3' was not equal (string) 'group1.field2'
directive_test.go:192 (TestAssertPath_Directive)
[/]:[1].Expected: actual(int): '3' was not equal (int) '2'
directive_test.go:192 (TestAssertPath_Directive)
[/]:[2].SubPath: actual(string): 'group1.field2' was not equal (string) 'group1.field3'
directive_test.go:192 (TestAssertPath_Directive)
[/]:[2].Expected: actual(int): '2' was not equal (int) '3'
--- FAIL: TestAssertPath_Directive (0.00s)
Full build log can be referenced:
Thank you!
Fedora 32 with Go 1.14 beta1
Testing in: /builddir/build/BUILD/assertly-0.5.3/_build/src
PATH: /builddir/build/BUILD/assertly-0.5.3/_build/bin:/builddir/.local/bin:/builddir/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
GOPATH: /builddir/build/BUILD/assertly-0.5.3/_build:/usr/share/gocode
GO111MODULE: off
command: go test -buildmode pie -compiler gc -ldflags "-X github.com/viant/assertly/version=0.5.3 -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '"
testing: github.com/viant/assertly
github.com/viant/assertly
--- FAIL: TestDataPath_Key (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x562473a4516e]
goroutine 35 [running]:
testing.tRunner.func1.1(0x562473b41100, 0x562473dd5a90)
/usr/lib/golang/src/testing/testing.go:942 +0x3d2
testing.tRunner.func1(0xc000155560)
/usr/lib/golang/src/testing/testing.go:945 +0x3fb
panic(0x562473b41100, 0x562473dd5a90)
/usr/lib/golang/src/runtime/panic.go:967 +0x161
github.com/viant/assertly.(*dataPath).Key(0xc000137630, 0x562473a64192, 0x2, 0x256142c50000000f, 0x5e44a74a)
/builddir/build/BUILD/assertly-0.5.3/_build/src/github.com/viant/assertly/path.go:63 +0x9e
github.com/viant/assertly.TestDataPath_Key(0xc000155560)
/builddir/build/BUILD/assertly-0.5.3/_build/src/github.com/viant/assertly/path_test.go:10 +0x71
testing.tRunner(0xc000155560, 0x562473bacc80)
/usr/lib/golang/src/testing/testing.go:993 +0xde
created by testing.(*T).Run
/usr/lib/golang/src/testing/testing.go:1044 +0x359
exit status 2
FAIL github.com/viant/assertly 0.022s
Not sure if this is linked to Go 1.14 or not.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.