-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Desync between vault/[email protected] and vault/[email protected]? #19099
Comments
I managed to get past the error by excluding [email protected] and vault/[email protected]
|
Hello! Unfortunately we don't support importing Vault as a module, as that can often run into conflicts when importing both Vault, along with the |
I'm facing similar import conflicts with these vault packages
@hsimon-hashicorp do you have any alternative suggestions / recommendations for how consumers of the vault kvv2 Maybe this issue needs to actually get addressed now #8440 |
I'm also dealing with this issue, as I would like to unit test my vault code as per the accepted answer on https://stackoverflow.com/questions/57771228/mocking-hashicorp-vault-in-go Any guidance appreciated! |
That answer is several years old, unfortunately. Previously it was "best effort" support, but the team made the decision last year to no longer support importing Vault, the API, or the SDK as modules in Go. I'm sorry for the inconvenience. |
Um, don't you mean "the Vault root module"? Considering the entire purpose of the API and SDK being separate is so they can be. |
@hsimon-hashicorp - understood on the supportability aspect of the various vault modules. But given this information, how do you recommend consumers of the API module unit test / int test things in Go? What is the use-case for How do you test the API module itself? FYI to others, I was able to get this working again with the current rc of the vault root module (
|
@maxb Yes, you are correct. We don't support importing the Vault root module, but importing API and SDK are supported. |
Describe the bug
I tried writing a unit test that creates an inmem vault. The unit test fails to run with the following errors:
If I try to exclude sdk v0.7.0, it fails with the following:
To Reproduce
Steps to reproduce the behavior:
checkout repo and run go unit test
https://github.com/wildsheepz/tryingoutvault.git
Expected behavior
No errors.
Environment:
Debian GNU/Linux 11
Additional context
Nil
The text was updated successfully, but these errors were encountered: