-
Notifications
You must be signed in to change notification settings - Fork 98
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
Added unit tests for various key stores #363
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently your tests are order dependent. We have to be able to run each test separately. Like go test -v -fs.path=<path> -run="FS_Create"
Maybe combine all FS tests into:
func TestFS(t *testing.T) {
config := edge.FSKeyStore{
Path: "./keys",
}
// Init the store - like create keys that should be there etc.
t.Run("create", ...)
t.Run("delete", ...)
// Add more tests
}
c75504b
to
b621ad6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from some minor outstandings LGTM.
Also, can you squash the commits into one and add a commit message explaining the purpose of this change and why things are done in a certain way - e.g. why we use the config file CLI flag approach etc. @shtripat |
Sure. Will do that. |
Purpose of this change is to enable testing of various backend key stores like Azure, GCP, HashiCorp Vault etc. The tests use command like flags e.g. `aws.config`, `azure.config` to get details to connect to the key store. This is done to make the changes generic and so code remains agnostic to addition of new keystores. Also this way we are making sure all backend key store integrations work just fine and later when integrated with KES server and client making calls through KES server, there wont be ny surprises. Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
Purpose of this change is to enable testing of various backend key stores like Azure, GCP, HashiCorp Vault etc. The tests use command like flags e.g.
aws.config
,azure.config
to get details to connect to the key store. This is done to make the changes generic and so code remains agnostic to addition of new keystores.Also this way we are making sure all backend key store integrations work just fine and later when integrated with KES server and client making calls throughKES server, there wont be any surprises.