-
Notifications
You must be signed in to change notification settings - Fork 5
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
Migrate the collection controller #275
Conversation
Codecov Report
@@ Coverage Diff @@
## 3-dev #275 +/- ##
==========================================
+ Coverage 89.71% 89.74% +0.02%
==========================================
Files 241 242 +1
Lines 4034 4045 +11
==========================================
+ Hits 3619 3630 +11
Misses 365 365
Partials 50 50
Continue to review full report at Codecov.
|
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.
Ok after those 2 minor fixes
collection/delete.go
Outdated
if index == "" { | ||
return types.NewError("Collection.Delete: index required", 400) | ||
} | ||
|
||
if collection == "" { | ||
return types.NewError("Collection.Delete: collection required", 400) | ||
} |
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.
You should let Kuzzle handle the errors if an index or collection name is empty
if index == "" { | |
return types.NewError("Collection.Delete: index required", 400) | |
} | |
if collection == "" { | |
return types.NewError("Collection.Delete: collection required", 400) | |
} |
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.
All the other controller actions have this kind of double check on input args. I think we should create an issue for those changes. What do you think @Aschen?
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.
Yes we should remove every double check from the Go SDK 👍
What does this PR do?
This PR adapt the collection controller to be compliant with Kuzzle V2
collection:delete
collection:refresh
(added earlier in Fix CI, travis version, documentation version and snippets on 3-dev #274)collection:validateSpecifications
remove deprecated testscollection:updateSpecifications
remove deprecated testscollection:getMapping
remove deprecated testsindex:refresh
withcollection:refresh
(done earlier in Fix CI, travis version, documentation version and snippets on 3-dev #274)