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

Unset profile when it is deleted #4922

Merged
merged 2 commits into from
Jul 30, 2019

Conversation

josedonizetti
Copy link
Member

Fixes #4891

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 30, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: josedonizetti
To complete the pull request process, please assign medyagh
You can assign the PR to them by writing /assign @medyagh in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 30, 2019
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

Looks good, only one request, could we have a unit test, similar to https://github.com/kubernetes/minikube/tree/master/pkg/minikube/config/testdata/.minikube/

we could have a separate testdata sub folder for it, and have a config file with a different profile set, and expect the Unset to change the file .

@josedonizetti
Copy link
Member Author

josedonizetti commented Jul 30, 2019

@medyagh Didn't understand. A unit test for the minikube delete or for the Unset function?

@medyagh
Copy link
Member

medyagh commented Jul 30, 2019

@medyagh Didn't understand. A unit test for the minikube delete or for the Unset function?

ideally for both, but the Unset function is first ! priority is, all public functions must have unit tests

@josedonizetti
Copy link
Member Author

josedonizetti commented Jul 30, 2019

@medyagh Unset already have a test. https://github.com/kubernetes/minikube/blob/master/cmd/minikube/cmd/config/unset_test.go

But it can be improved by reading the property after the unset. I'll look into it.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 30, 2019
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

looks good, ready for merge after test passes

@medyagh medyagh merged commit 3a718d9 into kubernetes:master Jul 30, 2019
@josedonizetti josedonizetti deleted the deletes-unset-profile branch July 30, 2019 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete profile should Unset the current profile
3 participants