CC-4669 CC-4671 CLI-125 Schema Registry API Key commands - #258
Conversation
4604514 to
c672dae
Compare
Codecov Report
@@ Coverage Diff @@
## master #258 +/- ##
==========================================
+ Coverage 41.08% 43.04% +1.96%
==========================================
Files 62 63 +1
Lines 4732 4776 +44
==========================================
+ Hits 1944 2056 +112
+ Misses 2543 2458 -85
- Partials 245 262 +17
Continue to review full report at Codecov.
|
c672dae to
e87e941
Compare
Cody A. Ray (codyaray)
left a comment
There was a problem hiding this comment.
approach looks good to me. a bunch of little code nits and a couple missing tests, but no blockers in here
|
|
||
| func (suite *APITestSuite) TestDeleteApiKey() { | ||
| cmd := suite.newCMD() | ||
| cmd.SetArgs(append([]string{"delete", apiKey})) |
There was a problem hiding this comment.
probably want to verify that correct apiKey ID was passed to the update and delete api keys
dc2960d to
7b85955
Compare
5afb8c0 to
f44374f
Compare
Cody A. Ray (codyaray)
left a comment
There was a problem hiding this comment.
lgtm, nice work!
a couple small things left, mostly test updates and a couple nits.
|
|
||
| if err := c.keystore.StoreAPIKey(userKey, kcc.ID, environment); err != nil { | ||
| return errors.HandleCommon(errors.Wrapf(err, "Unable to store API key locally."), cmd) | ||
| if resourceType == "kafka" { |
There was a problem hiding this comment.
can you pull out consts to the top of the file for the different resource types?
| } | ||
| return &kafkav1.KafkaCluster{AccountId: c.Config.Auth.Account.Id, Id: kafka.ID, ApiEndpoint: kafka.APIEndpoint}, nil | ||
| } | ||
| func (c *ConfigHelper) SchemaRegistry(resourceID, environment string, ctx context.Context) (*srv1.SchemaRegistryCluster, error) { |
There was a problem hiding this comment.
just noticed this has nothing to do with the CLI config; why's it in the ConfigHelper?
nit: ctx should always be the first param on a method
|
Thanks so much for the reviews Cody A. Ray (@codyaray)! Addressed all your comments |
6c5fe99 to
d80f6d1
Compare
This reverts commit 173f34d.
|
I am going to revert this PR for now since #273 which fixes it requires some additional work / renaming which won't happen for a few days |
No description provided.