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

test: vault connector errors on Mac #216

Closed
simanadler opened this issue Dec 20, 2020 · 4 comments · Fixed by #363
Closed

test: vault connector errors on Mac #216

simanadler opened this issue Dec 20, 2020 · 4 comments · Fixed by #363
Assignees
Labels
bug Something isn't working

Comments

@simanadler
Copy link
Member

When running "make test" on my Mac I got the following:

go: finding github.com/lib/pq v1.8.0
go: finding github.com/patrickmn/go-cache v2.1.0+incompatible
? github.com/ibm/the-mesh-for-data/connectors/vault [no test files]
? github.com/ibm/the-mesh-for-data/connectors/vault/testutil [no test files]
? github.com/ibm/the-mesh-for-data/connectors/vault/vault_utils [no test files]

github.com/shirou/gopsutil/disk

../../../../pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_darwin.go:67:51: cannot use stat.Mntfromname[:] (type []byte) as type []int8 in argument to common.IntToString
../../../../pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_darwin.go:68:49: cannot use stat.Mntonname[:] (type []byte) as type []int8 in argument to common.IntToString
../../../../pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_darwin.go:69:50: cannot use stat.Fstypename[:] (type []byte) as type []int8 in argument to common.IntToString
../../../../pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_darwin.go:85:43: cannot use stat.Fstypename[:] (type []byte) as type []int8 in argument to common.IntToString
FAIL github.com/ibm/the-mesh-for-data/connectors/vault/vaultconn-bl [build failed]
FAIL

@simanadler simanadler added the bug Something isn't working label Dec 20, 2020
@simanadler
Copy link
Member Author

I also tried: NO_SIMULATED_PROGRESS=true USE_EXISTING_CLUSTER=true make -C manager test
which failed as follows:

Makefile:74: warning: overriding commands for target docker-build' ../hack/make-rules/docker.mk:18: warning: ignoring old commands for target docker-build'
../hack/tools/bin/controller-gen object:headerFile=../hack/boilerplate.go.txt,year=2020 paths="./..."
../hack/tools/bin/controller-gen "crd:trivialVersions=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
go test ./... -coverprofile cover.out
? github.com/ibm/the-mesh-for-data/manager [no test files]
2020/12/20 13:08:18 Unauthorized
FAIL github.com/ibm/the-mesh-for-data/manager/apis/app/v1alpha1 9.407s
ok github.com/ibm/the-mesh-for-data/manager/apis/motion/v1alpha1 3.765s coverage: 22.1% of statements
Running Suite: Controller Suite

Random Seed: 1608462494
Will run 9 of 9 specs

STEP: bootstrapping test environment
2020-12-20T13:08:14.119+0200 DEBUG controller-runtime.test-env using existing cluster
2020-12-20T13:08:14.119+0200 DEBUG controller-runtime.test-env automatically acquiring client configuration
2020-12-20T13:08:14.122+0200 DEBUG controller-runtime.test-env installing CRDs
2020-12-20T13:08:14.122+0200 DEBUG controller-runtime.test-env reading CRDs from path {"path": "../../config/crd/bases"}
2020-12-20T13:08:14.124+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "app.m4d.ibm.com_blueprints.yaml"}
2020-12-20T13:08:14.126+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "app.m4d.ibm.com_m4dapplications.yaml"}
2020-12-20T13:08:14.126+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "app.m4d.ibm.com_m4dbuckets.yaml"}
2020-12-20T13:08:14.128+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "app.m4d.ibm.com_m4dmodules.yaml"}
2020-12-20T13:08:14.132+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "app.m4d.ibm.com_plotters.yaml"}
2020-12-20T13:08:14.136+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "motion.m4d.ibm.com_batchtransfers.yaml"}
2020-12-20T13:08:14.139+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "motion.m4d.ibm.com_streamtransfers.yaml"}
Failure [7.337 seconds]
[BeforeSuite] BeforeSuite
/Users/sima/Work/Dev/go/sima-m4d/the-mesh-for-data/manager/controllers/app/suite_test.go:53

Unexpected error:
<*errors.StatusError | 0xc0004b21e0>: {
ErrStatus: {
TypeMeta: {Kind: "", APIVersion: ""},
ListMeta: {
SelfLink: "",
ResourceVersion: "",
Continue: "",
RemainingItemCount: nil,
},
Status: "Failure",
Message: "Unauthorized",
Reason: "Unauthorized",
Details: nil,
Code: 401,
},
}
Unauthorized
occurred

/Users/sima/Work/Dev/go/sima-m4d/the-mesh-for-data/manager/controllers/app/suite_test.go:67

Ran 9 of 0 Specs in 7.337 seconds
FAIL! -- 0 Passed | 9 Failed | 0 Pending | 0 Skipped
--- FAIL: TestAPIs (7.34s)
FAIL
coverage: 7.6% of statements
FAIL github.com/ibm/the-mesh-for-data/manager/controllers/app 9.912s
? github.com/ibm/the-mesh-for-data/manager/controllers/app/modules [no test files]
? github.com/ibm/the-mesh-for-data/manager/controllers/mockup [no test files]
Running Suite: Controller Suite

Random Seed: 1608462493
Will run 2 of 2 specs

STEP: bootstrapping test environment
2020-12-20T13:08:13.696+0200 DEBUG controller-runtime.test-env using existing cluster
2020-12-20T13:08:13.696+0200 DEBUG controller-runtime.test-env automatically acquiring client configuration
2020-12-20T13:08:13.699+0200 DEBUG controller-runtime.test-env installing CRDs
2020-12-20T13:08:13.699+0200 DEBUG controller-runtime.test-env reading CRDs from path {"path": "../../config/crd/bases"}
2020-12-20T13:08:13.703+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "app.m4d.ibm.com_blueprints.yaml"}
2020-12-20T13:08:13.705+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "app.m4d.ibm.com_m4dapplications.yaml"}
2020-12-20T13:08:13.706+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "app.m4d.ibm.com_m4dbuckets.yaml"}
2020-12-20T13:08:13.708+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "app.m4d.ibm.com_m4dmodules.yaml"}
2020-12-20T13:08:13.713+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "app.m4d.ibm.com_plotters.yaml"}
2020-12-20T13:08:13.719+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "motion.m4d.ibm.com_batchtransfers.yaml"}
2020-12-20T13:08:13.723+0200 DEBUG controller-runtime.test-env read CRDs from file {"file": "motion.m4d.ibm.com_streamtransfers.yaml"}
Failure [7.715 seconds]
[BeforeSuite] BeforeSuite
/Users/sima/Work/Dev/go/sima-m4d/the-mesh-for-data/manager/controllers/motion/suite_test.go:62

Unexpected error:
<*errors.StatusError | 0xc000146aa0>: {
ErrStatus: {
TypeMeta: {Kind: "", APIVersion: ""},
ListMeta: {
SelfLink: "",
ResourceVersion: "",
Continue: "",
RemainingItemCount: nil,
},
Status: "Failure",
Message: "Unauthorized",
Reason: "Unauthorized",
Details: nil,
Code: 401,
},
}
Unauthorized
occurred

/Users/sima/Work/Dev/go/sima-m4d/the-mesh-for-data/manager/controllers/motion/suite_test.go:75

Ran 2 of 0 Specs in 7.716 seconds
FAIL! -- 0 Passed | 2 Failed | 0 Pending | 0 Skipped
--- FAIL: TestMotionAPIs (7.72s)
FAIL
coverage: 16.6% of statements
FAIL github.com/ibm/the-mesh-for-data/manager/controllers/motion 10.164s
? github.com/ibm/the-mesh-for-data/manager/controllers/utils [no test files]
? github.com/ibm/the-mesh-for-data/manager/unittests [no test files]
FAIL
make: *** [test] Error 1

@roee88
Copy link
Collaborator

roee88 commented Dec 27, 2020

@simanadler after #217, what error do you get? Please close this issue if it's working now.

@roee88
Copy link
Collaborator

roee88 commented Feb 3, 2021

We removed the go mod from the vault connector and this issue returned. Need to add to go.mod and ensure that it persists after go mod tidy

FYI @simanadler @hunchback

@roee88 roee88 reopened this Feb 3, 2021
@roee88
Copy link
Collaborator

roee88 commented Feb 9, 2021

@froesef can you help with that? In the linked issue from kubernetes/release it's both solved and a new check was added to the ci to check build on multiple platforms. We can copy their solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants