Merge pull request #64911 from bart0sh/PR0019-use-DefaultCRISocket-constant-in-reset

Automatic merge from submit-queue. 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>.

kubeadm: use constant instead of hardcoded path

**What this PR does / why we need it**:

Used DefaultCRISocket constant instead of hardcoded path
/var/run/dockershim.sock

**Release note**:
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-07-05 11:33:02 -07:00 committed by GitHub
commit c5967fbb74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ func NewCmdReset(in io.Reader, out io.Writer) *cobra.Command {
) )
cmd.PersistentFlags().StringVar( cmd.PersistentFlags().StringVar(
&criSocketPath, "cri-socket", "/var/run/dockershim.sock", &criSocketPath, "cri-socket", kubeadmapiv1alpha3.DefaultCRISocket,
"The path to the CRI socket to use with crictl when cleaning up containers.", "The path to the CRI socket to use with crictl when cleaning up containers.",
) )

View File

@ -58,7 +58,7 @@ func assertDirEmpty(t *testing.T, path string) {
func TestNewReset(t *testing.T) { func TestNewReset(t *testing.T) {
var in io.Reader var in io.Reader
certsDir := kubeadmapiv1alpha3.DefaultCertificatesDir certsDir := kubeadmapiv1alpha3.DefaultCertificatesDir
criSocketPath := "/var/run/dockershim.sock" criSocketPath := kubeadmapiv1alpha3.DefaultCRISocket
skipPreFlight := false skipPreFlight := false
forceReset := true forceReset := true