Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 447 for writeFiles (0.36 sec)

  1. cni/pkg/install/kubeconfig_test.go

    	k8sServicePort = "443"
    	kubeCAFilepath = "testdata/kube-ca.crt"
    	saToken        = "service_account_token_string"
    )
    
    func TestCreateValidKubeconfigFile(t *testing.T) {
    	tmp := t.TempDir()
    	os.WriteFile(filepath.Join(tmp, "token"), []byte(saToken), 0o644)
    	cases := []struct {
    		name               string
    		expectedFailure    bool
    		k8sServiceProtocol string
    		k8sServiceHost     string
    		k8sServicePort     string
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 17 21:52:29 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/cli-runtime/pkg/resource/kustomizevisitor_test.go

    `
    )
    
    func TestKustomizeVisitor(t *testing.T) {
    	fSys := filesys.MakeFsInMemory()
    	fSys.WriteFile(
    		konfig.DefaultKustomizationFileName(),
    		[]byte(kustomizationContent1))
    	fSys.WriteFile("deployment.yaml", []byte(deploymentContent))
    	fSys.WriteFile("namespace.yaml", []byte(namespaceContent))
    	fSys.WriteFile("jsonpatch.json", []byte(jsonpatchContent))
    	b := newDefaultBuilder()
    	kv := KustomizeVisitor{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 14 00:05:53 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  3. platforms/ide/tooling-api/src/crossVersionTest/groovy/org/gradle/integtests/tooling/r51/TaskExecutionResultCrossVersionSpec.groovy

            given:
            buildFile << """
                task writeFile {
                    def file = file("\$buildDir/test.txt")
                    outputs.file(file)
                    doFirst {
                        file.createNewFile()
                        file.text == "Hello, World!"
                    }
                }
            """
    
            when:
            runBuild('writeFile')
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 16 10:10:39 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  4. src/os/example_test.go

    	// Output:
    	// Hello, Gophers!
    }
    
    func ExampleWriteFile() {
    	err := os.WriteFile("testdata/hello", []byte("Hello, Gophers!"), 0666)
    	if err != nil {
    		log.Fatal(err)
    	}
    }
    
    func ExampleMkdir() {
    	err := os.Mkdir("testdir", 0750)
    	if err != nil && !os.IsExist(err) {
    		log.Fatal(err)
    	}
    	err = os.WriteFile("testdir/testfile.txt", []byte("Hello, Gophers!"), 0660)
    	if err != nil {
    		log.Fatal(err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 17:35:49 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  5. pilot/pkg/bootstrap/server_test.go

    	// load key and cert files.
    	if err := os.WriteFile(certFile, testcerts.ServerCert, 0o644); err != nil { // nolint: vetshadow
    		t.Fatalf("WriteFile(%v) failed: %v", certFile, err)
    	}
    	if err := os.WriteFile(keyFile, testcerts.ServerKey, 0o644); err != nil { // nolint: vetshadow
    		t.Fatalf("WriteFile(%v) failed: %v", keyFile, err)
    	}
    
    	if err := os.WriteFile(caFile, testcerts.CACert, 0o644); err != nil { // nolint: vetshadow
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 17:48:28 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  6. src/syscall/dirent_test.go

    	)
    
    	d := t.TempDir()
    	t.Logf("tmpdir: %s", d)
    
    	for i, c := range []byte("0123456789") {
    		name := string(bytes.Repeat([]byte{c}, filenameMinSize+i))
    		err := os.WriteFile(filepath.Join(d, name), nil, 0644)
    		if err != nil {
    			t.Fatalf("writefile: %v", err)
    		}
    	}
    
    	names := make([]string, 0, 10)
    
    	fd, err := syscall.Open(d, syscall.O_RDONLY, 0)
    	if err != nil {
    		t.Fatalf("syscall.open: %v", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  7. src/os/read_test.go

    		t.Fatal(err)
    	}
    	defer RemoveAll(tempDir)
    	filename := filepath.Join(tempDir, "blurp.txt")
    
    	shmorp := []byte("shmorp")
    	florp := []byte("florp")
    	err = WriteFile(filename, shmorp, 0444)
    	if err != nil {
    		t.Fatalf("WriteFile %s: %v", filename, err)
    	}
    	err = WriteFile(filename, florp, 0444)
    	if err == nil {
    		t.Fatalf("Expected an error when writing to read-only file %s", filename)
    	}
    	got, err := ReadFile(filename)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 02:36:46 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  8. platforms/documentation/docs/src/snippets/testKit/junitQuickstart/kotlin/src/test/java/org/gradle/sample/BuildLogicFunctionalTest.java

            writeFile(settingsFile, "rootProject.name = 'hello-world'");
            String buildFileContent = "task helloWorld {" +
                                      "    doLast {" +
                                      "        println 'Hello world!'" +
                                      "    }" +
                                      "}";
            writeFile(buildFile, buildFileContent);
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 2K bytes
    - Viewed (0)
  9. pkg/filewatcher/filewatcher_test.go

    	g := NewGomegaWithT(t)
    
    	watchDir := t.TempDir()
    
    	watchFile1 := path.Join(watchDir, "test1.conf")
    	err := os.WriteFile(watchFile1, []byte("foo: bar\n"), 0o640)
    	g.Expect(err).NotTo(HaveOccurred())
    
    	watchFile2 := path.Join(watchDir, "test2.conf")
    	err = os.WriteFile(watchFile2, []byte("foo: baz\n"), 0o640)
    	g.Expect(err).NotTo(HaveOccurred())
    
    	return watchFile1, watchFile2
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  10. src/runtime/wincallback.go

    TEXT runtime·callbackasm(SB),NOSPLIT|NOFRAME,$0
    `)
    	for i := 0; i < maxCallback; i++ {
    		buf.WriteString("\tCALL\truntime·callbackasm1(SB)\n")
    	}
    
    	filename := fmt.Sprintf("zcallback_windows.s")
    	err := os.WriteFile(filename, buf.Bytes(), 0666)
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "wincallback: %s\n", err)
    		os.Exit(2)
    	}
    }
    
    func genasmArm() {
    	var buf bytes.Buffer
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 24 19:29:51 UTC 2023
    - 3.5K bytes
    - Viewed (0)
Back to top