kubernetes: k8s.io/kubernetes/cmd/kubeadm/test Index | Files | Directories

package test

import "k8s.io/kubernetes/cmd/kubeadm/test"

Index

Package Files

util.go

func AssertError Uses

func AssertError(t *testing.T, err error, expected string)

AssertError checks that the provided error matches the expected output

func AssertFileExists Uses

func AssertFileExists(t *testing.T, dirName string, fileNames ...string)

AssertFileExists is a utility function for kubeadm testing that asserts if the given folder contains the given files.

func AssertFilesCount Uses

func AssertFilesCount(t *testing.T, dirName string, count int)

AssertFilesCount is a utility function for kubeadm testing that asserts if the given folder contains count files.

func GetDefaultInternalConfig Uses

func GetDefaultInternalConfig(t *testing.T) *kubeadmapi.InitConfiguration

GetDefaultInternalConfig returns a defaulted kubeadmapi.InitConfiguration

func SetupEmptyFiles Uses

func SetupEmptyFiles(t *testing.T, tmpdir string, fileNames ...string)

SetupEmptyFiles is a utility function for kubeadm testing that creates one or more empty files (touch)

func SetupInitConfigurationFile Uses

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 SetupPkiDirWithCertificateAuthority Uses

func SetupPkiDirWithCertificateAuthority(t *testing.T, tmpdir string) string

SetupPkiDirWithCertificateAuthority is a utility function for kubeadm testing that creates a CertificateAuthority cert/key pair into /pki subfolder of a given temporary directory. The function returns the path of the created pki.

func SetupTempDir Uses

func SetupTempDir(t *testing.T) string

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)

Directories

PathSynopsis
cmd
kubeconfig

Package test imports 13 packages (graph). Updated 2019-10-12. Refresh now. Tools for package owners.