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

notary delete CLI command #895

Merged
merged 2 commits into from
Aug 8, 2016
Merged

notary delete CLI command #895

merged 2 commits into from
Aug 8, 2016

Conversation

riyazdf
Copy link
Contributor

@riyazdf riyazdf commented Aug 3, 2016

Wires up DeleteTrustData from the client library to a notary delete command, which will delete all local TUF metadata by default and additionally the remote metadata if the --remote flag is given.

Closes #710

Signed-off-by: Riyaz Faizullabhoy riyaz.faizullabhoy@docker.com

@riyazdf riyazdf added this to the Notary 0.4 milestone Aug 3, 2016
tempFile.Close()
defer os.Remove(tempFile.Name())

// Setup certificate
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking nitpick - setting up the cert and adding a delegation role + target to the delegation seems to also be done by TestPurge and TestClientDelegationsInteraction and TestClientDelegationsPublishing, although this one doesn't need the key ID of the cert. I was wondering if we could factor this logic out to a helper function?

Copy link
Contributor Author

@riyazdf riyazdf Aug 3, 2016

Choose a reason for hiding this comment

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

Good idea - added a helper to generate a private key, cert, and keyID

@cyli
Copy link
Contributor

cyli commented Aug 3, 2016

Thanks for adding this so quickly @riyazdf! Couple of minor nits on tests, but otherwise LGTM!

@cyli
Copy link
Contributor

cyli commented Aug 3, 2016

LGTM! Thanks for fixing this so fast!

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
@endophage
Copy link
Contributor

LGTM! Tests look great too 👍

@endophage endophage merged commit 0a7b329 into master Aug 8, 2016
@riyazdf riyazdf deleted the delete-cli-cmd branch August 9, 2016 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants