Merge pull request #125178 from my-git9/unusedfunction
kubeadm: remove some unused function
This commit is contained in:
		@@ -577,16 +577,6 @@ func GetAdminKubeConfigPath() string {
 | 
			
		||||
	return filepath.Join(KubernetesDir, AdminKubeConfigFileName)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetSuperAdminKubeConfigPath returns the location on the disk where admin kubeconfig is located by default
 | 
			
		||||
func GetSuperAdminKubeConfigPath() string {
 | 
			
		||||
	return filepath.Join(KubernetesDir, SuperAdminKubeConfigFileName)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetBootstrapKubeletKubeConfigPath returns the location on the disk where bootstrap kubelet kubeconfig is located by default
 | 
			
		||||
func GetBootstrapKubeletKubeConfigPath() string {
 | 
			
		||||
	return filepath.Join(KubernetesDir, KubeletBootstrapKubeConfigFileName)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetKubeletKubeConfigPath returns the location on the disk where kubelet kubeconfig is located by default
 | 
			
		||||
func GetKubeletKubeConfigPath() string {
 | 
			
		||||
	return filepath.Join(KubernetesDir, KubeletKubeConfigFileName)
 | 
			
		||||
 
 | 
			
		||||
@@ -50,32 +50,6 @@ func TestGetAdminKubeConfigPath(t *testing.T) {
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestGetSuperAdminKubeConfigPath(t *testing.T) {
 | 
			
		||||
	expected := filepath.Join(KubernetesDir, SuperAdminKubeConfigFileName)
 | 
			
		||||
	actual := GetSuperAdminKubeConfigPath()
 | 
			
		||||
 | 
			
		||||
	if actual != expected {
 | 
			
		||||
		t.Errorf(
 | 
			
		||||
			"failed GetSuperAdminKubeConfigPath:\n\texpected: %s\n\t  actual: %s",
 | 
			
		||||
			expected,
 | 
			
		||||
			actual,
 | 
			
		||||
		)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestGetBootstrapKubeletKubeConfigPath(t *testing.T) {
 | 
			
		||||
	expected := filepath.FromSlash("/etc/kubernetes/bootstrap-kubelet.conf")
 | 
			
		||||
	actual := GetBootstrapKubeletKubeConfigPath()
 | 
			
		||||
 | 
			
		||||
	if actual != expected {
 | 
			
		||||
		t.Errorf(
 | 
			
		||||
			"failed GetBootstrapKubeletKubeConfigPath:\n\texpected: %s\n\t  actual: %s",
 | 
			
		||||
			expected,
 | 
			
		||||
			actual,
 | 
			
		||||
		)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestGetKubeletKubeConfigPath(t *testing.T) {
 | 
			
		||||
	expected := filepath.FromSlash("/etc/kubernetes/kubelet.conf")
 | 
			
		||||
	actual := GetKubeletKubeConfigPath()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user