• Kubernetes Submit Queue's avatar
    Merge pull request #63991 from neolit123/test-upgrade-diff · 10b8665a
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 62025, 63851, 64077, 63967, 63991). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Add unit tests to `kubeadm upgrade diff` and small improvements
    
    **What this PR does / why we need it**:
    
    has a couple of commits:
    
    I.
    ```
    1) Store the io.Writer and pass it to sub-commands in upgrade.go
    2) Check if the manifest path is an empty string in diff.go:runDiff()
    3) Use the io.Writer that upgrade.go defines instead of writing to
    os.Stdout directly.
    ```
    II.
    ```
    Add the file diff_test.go, which has a single test:
      TestRunDiff
    
    The test covers most error cases for the runDiff() function,
    and also performs a valid diff.
    ```
    
    
    **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
    Fixes kubernetes/kubeadm#826
    
    **Special notes for your reviewer**:
    @liztio @luxas 
    
    **Release note**:
    
    ```release-note
    NONE
    ```
    10b8665a
Name
Last commit
Last update
..
clicheck Loading commit data...
cloud-controller-manager Loading commit data...
controller-manager Loading commit data...
gendocs Loading commit data...
genkubedocs Loading commit data...
genman Loading commit data...
genswaggertypedocs Loading commit data...
genutils Loading commit data...
genyaml Loading commit data...
hyperkube Loading commit data...
importverifier Loading commit data...
kube-apiserver Loading commit data...
kube-controller-manager Loading commit data...
kube-proxy Loading commit data...
kube-scheduler Loading commit data...
kubeadm Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
linkcheck Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...