Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating test framework reveals a bunch of failing tests #256

Closed
liamsi opened this issue Mar 6, 2019 · 1 comment
Closed

Updating test framework reveals a bunch of failing tests #256

liamsi opened this issue Mar 6, 2019 · 1 comment
Assignees

Comments

@liamsi
Copy link
Contributor

liamsi commented Mar 6, 2019

While playing with go modules, I realized that a bunch of tests started failing in #255

Note, this is not related to go modules at all! This is due to some outdated dependencies. Probably, testify/assert was buggy. dep ensure -update will expose the exact same failing tests.

Click below to expand which tests are failing:

 make test
go test github.com/tendermint/go-amino github.com/tendermint/go-amino/cmd/aminoscan github.com/tendermint/go-amino/tests github.com/tendermint/go-amino/tests/fuzz/binary github.com/tendermint/go-amino/tests/fuzz/binary/debug github.com/tendermint/go-amino/tests/fuzz/binary/init-corpus github.com/tendermint/go-amino/tests/fuzz/json github.com/tendermint/go-amino/tests/fuzz/json/debug github.com/tendermint/go-amino/tests/proto3/proto
--- FAIL: TestUnmarshalMap (0.00s)
    json_test.go:182: 
                Error Trace:    json_test.go:182
                                                        json_test.go:180
                Error:          should have paniced but got err: %v
                Test:           TestUnmarshalMap
                Messages:       Not enough bytes to read in UnmarshalBinaryLengthPrefixed, want 100 more bytes but only have 7
    json_test.go:180: 
                Error Trace:    json_test.go:180
                Error:          func (assert.PanicTestFunc)(0x1351430) should panic
                                        Panic value:    <nil>
                Test:           TestUnmarshalMap
    json_test.go:186: 
                Error Trace:    json_test.go:186
                                                        json_test.go:184
                Error:          should have paniced but got err: %v
                Test:           TestUnmarshalMap
                Messages:       Not enough bytes to read in UnmarshalBinaryLengthPrefixed, want 100 more bytes but only have 7
    json_test.go:184: 
                Error Trace:    json_test.go:184
                Error:          func (assert.PanicTestFunc)(0x1351520) should panic
                                        Panic value:    <nil>
                Test:           TestUnmarshalMap
    json_test.go:196: 
                Error Trace:    json_test.go:196
                                                        json_test.go:194
                Error:          should have paniced but got err: %v
                Test:           TestUnmarshalMap
                Messages:       invalid character -- Amino:JSON int/int64/uint/uint64 expects quoted values for javascript numeric support, got: 2.
    json_test.go:194: 
                Error Trace:    json_test.go:194
                Error:          func (assert.PanicTestFunc)(0x1351740) should panic
                                        Panic value:    <nil>
                Test:           TestUnmarshalMap
    json_test.go:200: 
                Error Trace:    json_test.go:200
                                                        json_test.go:198
                Error:          should have paniced but got err: %v
                Test:           TestUnmarshalMap
                Messages:       invalid character -- Amino:JSON int/int64/uint/uint64 expects quoted values for javascript numeric support, got: 2.
    json_test.go:198: 
                Error Trace:    json_test.go:198
                Error:          func (assert.PanicTestFunc)(0x1351830) should panic
                                        Panic value:    <nil>
                Test:           TestUnmarshalMap
--- FAIL: TestUnmarshalFunc (0.00s)
    json_test.go:217: 
                Error Trace:    json_test.go:217
                                                        json_test.go:215
                Error:          should have paniced but got err: %v
                Test:           TestUnmarshalFunc
                Messages:       Not enough bytes to read in UnmarshalBinaryLengthPrefixed, want 100 more bytes but only have 7
    json_test.go:215: 
                Error Trace:    json_test.go:215
                Error:          func (assert.PanicTestFunc)(0x1351a60) should panic
                                        Panic value:    <nil>
                Test:           TestUnmarshalFunc
    json_test.go:221: 
                Error Trace:    json_test.go:221
                                                        json_test.go:219
                Error:          should have paniced but got err: %v
                Test:           TestUnmarshalFunc
                Messages:       Not enough bytes to read in UnmarshalBinaryLengthPrefixed, want 100 more bytes but only have 7
    json_test.go:219: 
                Error Trace:    json_test.go:219
                Error:          func (assert.PanicTestFunc)(0x1351b50) should panic
                                        Panic value:    <nil>
                Test:           TestUnmarshalFunc
    json_test.go:235: 
                Error Trace:    json_test.go:235
                                                        json_test.go:233
                Error:          should have paniced but got err: %v
                Test:           TestUnmarshalFunc
                Messages:       UnmarshalJSON expects a pointer
    json_test.go:233: 
                Error Trace:    json_test.go:233
                Error:          func (assert.PanicTestFunc)(0x1351e60) should panic
                                        Panic value:    <nil>
                Test:           TestUnmarshalFunc
FAIL
FAIL    github.com/tendermint/go-amino  120.378s
?       github.com/tendermint/go-amino/cmd/aminoscan    [no test files]
?       github.com/tendermint/go-amino/tests    [no test files]
?       github.com/tendermint/go-amino/tests/fuzz/binary        [no test files]
?       github.com/tendermint/go-amino/tests/fuzz/binary/debug  [no test files]
?       github.com/tendermint/go-amino/tests/fuzz/binary/init-corpus    [no test files]
?       github.com/tendermint/go-amino/tests/fuzz/json  [no test files]
?       github.com/tendermint/go-amino/tests/fuzz/json/debug    [no test files]
?       github.com/tendermint/go-amino/tests/proto3/proto       [no test files]
make: *** [test] Error 1
liamsi added a commit that referenced this issue Mar 6, 2019
- some go vet lints (redundant type)
@liamsi liamsi self-assigned this Mar 6, 2019
liamsi added a commit that referenced this issue Mar 20, 2019
* migrated from dep to Go modules
 - remove traces of dep from make file: go build will handle those for us
 - update circelci config to go1.12

* switch to golangci-linter instead of metalinter

* use exact same versions as in dep

* Fix JSON tests #256

- some go vet lints (redundant type)

* remove traces of metalinter

* add back updated versions of Gopkg.toml / Gopkg.lock (matching the
updated versions in modules)

* re-enable linter, disable a few which currently won't pass (will be
addressed in followup PR)
@liamsi
Copy link
Contributor Author

liamsi commented May 15, 2019

fixed in #255

@liamsi liamsi closed this as completed May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant