func (tk *TestKubeconfig) WriteFileViaContainer(podName, containerName string, path string, contents string) error {
	ginkgo.By("writing a file in the container")
	allowedCharacters := "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	for _, c := range contents {
		if !strings.ContainsRune(allowedCharacters, c) {
			return fmt.Errorf("Unsupported character in string to write: %v", c)
		}
	}
	command := fmt.Sprintf("echo '%s' > '%s'; sync", contents, path)
	stdout, stderr, err := tk.kubectlExecWithRetry(tk.Namespace, podName, containerName, "--", "/bin/sh", "-c", command)
	if err != nil {
		e2elog.Logf("error running kubectl exec to write file: %v\nstdout=%v\nstderr=%v)", err, string(stdout), string(stderr))
	}
	return err
}
// WriteFileViaContainer writes a file using kubectl exec echo <contents> > <path> via specified container
// because of the primitive technique we're using here, we only allow ASCII alphanumeric characters
WriteFileViaContainer writes a file using kubectl exec echo  >  via specified container
because of the primitive technique we're using here, we only allow ASCII alphanumeric characters
// WriteFileViaContainer writes a file using kubectl exec echo <contents > > <path > via specified container // because of the primitive technique we ' re using here we only allow ASCII alphanumeric characters
func (tk *TestKubeconfig) WriteFileViaContainer(podName, containerName string, path string, contents string) error {
	ginkgo.By("writing a file in the container")
	allowedCharacters := "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	for _, c := range contents {
		if !strings.ContainsRune(allowedCharacters, c) {
			return fmt.Errorf("Unsupported character in string to write: %v", c)
		}
	}
	command := fmt.Sprintf("echo '%s' > '%s'; sync", contents, path)
	stdout, stderr, err := tk.kubectlExecWithRetry(tk.Namespace, podName, containerName, "--", "/bin/sh", "-c", command)
	if err != nil {
		e2elog.Logf("error running kubectl exec to write file: %v\nstdout=%v\nstderr=%v)", err, string(stdout), string(stderr))
	}
	return err
}
func ( tk * TestKubeconfig ) WriteFileViaContainer ( podName , containerName string , path string , contents string ) error { ginkgo . By ( " " ) allowedCharacters := " " for _ , c := range contents { if ! strings . ContainsRune ( allowedCharacters , c ) { return fmt . Errorf ( " " , c ) } } command := fmt . Sprintf ( " " , contents , path ) stdout , stderr , err := tk . kubectlExecWithRetry ( tk . Namespace , podName , containerName , " " , " " , " " , command ) if err != nil { e2elog . Logf ( " \n \n " , err , string ( stdout ) , string ( stderr ) ) } return err }
WriteFileViaContainer writes a file using kubectl exec echo  >  via specified container
because of the primitive technique we're using here, we only allow ASCII alphanumeric characters
WriteFileViaContainer writes a file using kubectl exec echo > via specified container because of the primitive technique we ' re using here we only allow ASCII alphanumeric characters