Unleash / unleash-client-go

Unleash client SDK for Go
https://docs.getunleash.io
Apache License 2.0
138 stars 55 forks source link

Missing testdata results in failed build #94

Closed nilsmagnus closed 2 years ago

nilsmagnus commented 2 years ago

Environment: Ubuntu Linux go version go1.13.8 linux/amd64

Steps to reproduce:

$ git clone git@github.com:Unleash/unleash-client-go.git
$ cd unleash-client
$ make

Result:

unleash-client-go (v3)$ make
go vet ./...
go: downloading github.com/twmb/murmur3 v1.1.5
go: downloading github.com/stretchr/testify v1.2.2
go: downloading gopkg.in/h2non/gock.v1 v1.0.10
go: extracting github.com/stretchr/testify v1.2.2
go: extracting github.com/twmb/murmur3 v1.1.5
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading github.com/stretchr/objx v0.1.1
go: downloading github.com/davecgh/go-spew v1.1.1
go: extracting github.com/pmezard/go-difflib v1.0.0
go: extracting github.com/stretchr/objx v0.1.1
go: extracting github.com/davecgh/go-spew v1.1.1
go: extracting gopkg.in/h2non/gock.v1 v1.0.10
go: finding github.com/twmb/murmur3 v1.1.5
go: finding github.com/stretchr/testify v1.2.2
go: finding gopkg.in/h2non/gock.v1 v1.0.10
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/stretchr/objx v0.1.1
go: finding github.com/davecgh/go-spew v1.1.1
go test ./...
--- FAIL: TestClientSpecificationSuite (0.00s)
    --- FAIL: TestClientSpecificationSuite/TestClientSpecification (0.00s)
        spec_test.go:169: 
                Error Trace:    spec_test.go:169
                                            suite.go:88
                Error:          Received unexpected error:
                                open testdata/client-specification/specifications/index.json: no such file or directory
                Test:           TestClientSpecificationSuite/TestClientSpecification
        spec_test.go:175: 
                Error Trace:    spec_test.go:175
                                            suite.go:88
                Error:          Received unexpected error:
                                invalid argument
                Test:           TestClientSpecificationSuite/TestClientSpecification
FAIL
FAIL    github.com/Unleash/unleash-client-go/v3 2.839s
ok      github.com/Unleash/unleash-client-go/v3/api 0.004s
ok      github.com/Unleash/unleash-client-go/v3/context 0.015s
?       github.com/Unleash/unleash-client-go/v3/internal/api    [no test files]
ok      github.com/Unleash/unleash-client-go/v3/internal/constraints    0.005s
ok      github.com/Unleash/unleash-client-go/v3/internal/strategies 0.905s
?       github.com/Unleash/unleash-client-go/v3/strategy    [no test files]
FAIL
make: *** [Makefile:25: test] Error 1
jrbarron commented 2 years ago

The specification is from this repository: https://github.com/Unleash/client-specification

You can get it by doing the following:

cd testdata
git clone git@github.com:Unleash/client-specification.git

We should probably add this as a git submodule or vendor it in 🤔

ivarconr commented 2 years ago

We should probably add this as a git submodule or vendor it in thinking

yes please, can we do that against a versioned git-tag @jrbarron ?

Our it can be done as part of running the tests. In Java it is handled by maven and in node we have it as a dev-dependency.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.