Unverified Commit c5967fbb authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents d10ff1a2 00fb7aad
...@@ -76,7 +76,7 @@ func NewCmdReset(in io.Reader, out io.Writer) *cobra.Command { ...@@ -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.",
) )
......
...@@ -58,7 +58,7 @@ func assertDirEmpty(t *testing.T, path string) { ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment