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

cephmgr/client package cannot use cephmgr/client/test package due to cyclical dependency #78

Closed
jbw976 opened this issue Oct 14, 2016 · 1 comment
Assignees
Labels

Comments

@jbw976
Copy link
Member

jbw976 commented Oct 14, 2016

We can not use the mocked types from cephmgr/client/test to test the cephmgr/client package itself because of a cyclical dependency. This indicates a layering issue.

We could move some of the helper methods (e.g. pool.go, auth.go) to a package that is a peer of cephmgr/client. Essentially, usage of the cephmgr/client interfaces should not be within the same package, or else they cannot be tested using the mocked implementations of those interfaces.

/castle/pkg/cephmgr/client
> go test
# github.com/quantum/castle/pkg/cephmgr/client
import cycle not allowed in test
package github.com/quantum/castle/pkg/cephmgr/client (test)
    imports github.com/quantum/castle/pkg/cephmgr/client/test
    imports github.com/quantum/castle/pkg/cephmgr/client

FAIL    github.com/quantum/castle/pkg/cephmgr/client [setup failed]
@jbw976 jbw976 self-assigned this Oct 25, 2016
@jbw976 jbw976 self-assigned this Oct 26, 2016
@travisn travisn added the build label Dec 7, 2016
@travisn
Copy link
Member

travisn commented Apr 18, 2017

we can refactor this if needed for tests in the future

@travisn travisn closed this as completed Apr 18, 2017
travisn pushed a commit to travisn/rook that referenced this issue Jul 13, 2020
Bug 1849723: Revert "ceph: added PVC utilization alerts"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants