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

[Bug] Return the Bad-Request when deleting the storage if it's used by some volume #285

Merged
merged 3 commits into from
Aug 29, 2018

Conversation

John-Lin
Copy link
Contributor

No description provided.

@John-Lin John-Lin changed the title Check the volume before creating [Bug] Check the volume before creating Aug 28, 2018
@hwchiu hwchiu force-pushed the hwchiu/fix-wrong-ret branch from 994f912 to 052245d Compare August 28, 2018 07:05
@hwchiu hwchiu changed the title [Bug] Check the volume before creating [Bug] Return the Bad-Request when deleting the storage if it's used by some volume Aug 28, 2018
@hwchiu hwchiu force-pushed the hwchiu/fix-wrong-ret branch from 052245d to 44d45e1 Compare August 28, 2018 07:12
@hwchiu hwchiu force-pushed the hwchiu/fix-wrong-ret branch from 44d45e1 to d91527a Compare August 28, 2018 07:18
@codecov-io
Copy link

codecov-io commented Aug 28, 2018

Codecov Report

Merging #285 into develop will increase coverage by 1.82%.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #285      +/-   ##
===========================================
+ Coverage    78.59%   80.41%   +1.82%     
===========================================
  Files           62       62              
  Lines         3485     3697     +212     
===========================================
+ Hits          2739     2973     +234     
+ Misses         564      551      -13     
+ Partials       182      173       -9
Impacted Files Coverage Δ
src/storageprovider/storage.go 100% <ø> (ø) ⬆️
src/server/handler_storage.go 83.43% <25%> (+5.17%) ⬆️
src/storageprovider/fake.go 85.71% <50%> (-14.29%) ⬇️
src/storageprovider/nfs.go 91.75% <60%> (-0.88%) ⬇️
src/server/route.go 86.09% <0%> (+1.01%) ⬆️
src/server/backend/jwt.go 88.23% <0%> (+1.87%) ⬆️
src/prometheuscontroller/controller.go 88.9% <0%> (+2.86%) ⬆️
src/networkcontroller/network_controller.go 85.71% <0%> (+3.1%) ⬆️
src/server/handler_deployment.go 80.26% <0%> (+11.09%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update abca5d8...425ad1e. Read the comment docs.

@@ -151,6 +151,10 @@ func deleteStorage(ctx *web.Context) {
return
}

if err := storageProvider.ValidateBeforeDeleting(sp, &storage); err != nil {
response.BadRequest(req.Request, resp.ResponseWriter, err)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing return

@hwchiu hwchiu force-pushed the hwchiu/fix-wrong-ret branch from 352c87e to 425ad1e Compare August 29, 2018 02:44
@John-Lin John-Lin merged commit d29be41 into develop Aug 29, 2018
@John-Lin John-Lin deleted the hwchiu/fix-wrong-ret branch August 30, 2018 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants