package test
import "k8s.io/kubernetes/cmd/kubeadm/test"
Index ¶
- func AssertFileExists(t *testing.T, dirName string, fileNames ...string)
- func AssertFilesCount(t *testing.T, dirName string, count int)
- func SetupEmptyFiles(t *testing.T, tmpdir string, fileNames ...string)
- func SetupMasterConfigurationFile(t *testing.T, tmpdir string, cfg *kubeadmapi.MasterConfiguration) string
- func SetupPkiDirWithCertificateAuthorithy(t *testing.T, tmpdir string) string
- func SetupTempDir(t *testing.T) string
Functions ¶
func AssertFileExists ¶
AssertFileExists is a utility function for kubeadm testing that asserts if the given folder contains the given files.
func AssertFilesCount ¶
AssertFilesCount is a utility function for kubeadm testing that asserts if the given folder contains count files.
func SetupEmptyFiles ¶
SetupEmptyFiles is a utility function for kubeadm testing that creates one or more empty files (touch)
func SetupMasterConfigurationFile ¶
func SetupMasterConfigurationFile(t *testing.T, tmpdir string, cfg *kubeadmapi.MasterConfiguration) string
SetupMasterConfigurationFile is a utility function for kubeadm testing that writes a master configuration file into /config subfolder of a given temporary directory. The funtion returns the path of the created master configuration file.
func SetupPkiDirWithCertificateAuthorithy ¶
SetupPkiDirWithCertificateAuthorithy is a utility function for kubeadm testing that creates a CertificateAuthorithy cert/key pair into /pki subfolder of a given temporary directory. The funtion returns the path of the created pki.
func SetupTempDir ¶
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)
Source Files ¶
util.go
Directories ¶
Path | Synopsis |
---|---|
cmd/kubeadm/test/certs | |
cmd/kubeadm/test/cmd | |
cmd/kubeadm/test/kubeconfig |
- Version
- v1.8.1
- Published
- Oct 11, 2017
- Platform
- js/wasm
- Imports
- 10 packages
- Last checked
- 15 minutes ago –
Tools for package owners.