Documentation ¶
Index ¶
- func AssertError(t *testing.T, err error, expected string)
- func AssertFileExists(t *testing.T, dirName string, fileNames ...string)
- func AssertFilesCount(t *testing.T, dirName string, count int)
- func GetDefaultInternalConfig(t *testing.T) *kubeadmapi.InitConfiguration
- func SetupEmptyFiles(t *testing.T, tmpdir string, fileNames ...string)
- func SetupInitConfigurationFile(t *testing.T, tmpdir string, cfg *kubeadmapi.InitConfiguration) string
- func SetupPkiDirWithCertificateAuthorithy(t *testing.T, tmpdir string) string
- func SetupTempDir(t *testing.T) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertError ¶ added in v1.13.0
AssertError checks that the provided error matches the expected output
func AssertFileExists ¶ added in v1.8.0
AssertFileExists is a utility function for kubeadm testing that asserts if the given folder contains the given files.
func AssertFilesCount ¶ added in v1.8.0
AssertFilesCount is a utility function for kubeadm testing that asserts if the given folder contains count files.
func GetDefaultInternalConfig ¶ added in v1.12.0
func GetDefaultInternalConfig(t *testing.T) *kubeadmapi.InitConfiguration
GetDefaultInternalConfig returns a defaulted kubeadmapi.InitConfiguration
func SetupEmptyFiles ¶ added in v1.8.0
SetupEmptyFiles is a utility function for kubeadm testing that creates one or more empty files (touch)
func SetupInitConfigurationFile ¶ added in v1.12.0
func SetupInitConfigurationFile(t *testing.T, tmpdir string, cfg *kubeadmapi.InitConfiguration) string
SetupInitConfigurationFile is a utility function for kubeadm testing that writes a InitConfiguration file into /config subfolder of a given temporary directory. The function returns the path of the created InitConfiguration file.
func SetupPkiDirWithCertificateAuthorithy ¶ added in v1.8.0
SetupPkiDirWithCertificateAuthorithy is a utility function for kubeadm testing that creates a CertificateAuthorithy cert/key pair into /pki subfolder of a given temporary directory. The function returns the path of the created pki.
func SetupTempDir ¶ added in v1.8.0
SetupTempDir is a utility function for kubeadm testing, that creates a temporary directory NB. it is up to the caller to cleanup the folder at the end of the test with defer os.RemoveAll(tmpdir)
Types ¶
This section is empty.