Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for writeFile (0.18 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)
    	constants.ServiceAccountPath = tmp
    	cases := []struct {
    		name               string
    		expectedFailure    bool
    		k8sServiceProtocol string
    		k8sServiceHost     string
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 08 03:52:24 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  2. cmd/os-readdir_test.go

    	if _, err := readDir("/tmp/non-existent-directory"); err != errFileNotFound {
    		t.Fatalf("expected = %s, got: %s", errFileNotFound, err)
    	}
    
    	file := path.Join(os.TempDir(), "issue")
    	if err := os.WriteFile(file, []byte(""), 0o644); err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(file)
    
    	// Check if file is given.
    	if _, err := readDir(path.Join(file, "mydir")); err != errFileNotFound {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 7.5K bytes
    - Viewed (0)
  3. operator/cmd/mesh/profile-dump_test.go

    			got = installPackagePathRegex.ReplaceAllString(got, "")
    
    			if refreshGoldenFiles() {
    				t.Logf("Refreshing golden file for %s", outPath)
    				if err := os.WriteFile(outPath, []byte(got), 0o644); err != nil {
    					t.Error(err)
    				}
    			}
    
    			want, err := readFile(outPath)
    			if err != nil {
    				t.Fatal(err)
    			}
    			if !util.IsYAMLEqual(got, want) {
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Thu Jan 20 11:44:25 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  4. operator/cmd/mesh/operator_test.go

    	gotYAML, err := runCommand(cmd)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	if refreshGoldenFiles() {
    		t.Logf("Refreshing golden file for %s", goldenFilepath)
    		if err := os.WriteFile(goldenFilepath, []byte(gotYAML), 0o644); err != nil {
    			t.Error(err)
    		}
    	}
    
    	wantYAML, err := readFile(goldenFilepath)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Tue Aug 29 14:15:33 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  5. internal/store/queuestore.go

    	for i := range item {
    		err := enc.Encode(item[i])
    		if err != nil {
    			return err
    		}
    	}
    	b := buf.Bytes()
    
    	path := filepath.Join(store.directory, key+store.fileExt)
    	err := os.WriteFile(path, b, os.FileMode(0o770))
    	buf.Reset()
    	if err != nil {
    		return err
    	}
    
    	// Increment the item count.
    	store.entries[key] = time.Now().UnixNano()
    
    	return nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb1/smb1/SmbNamedPipe.java

     * <li> <code>TransactNamedPipe</code> A message-type pipe call that
     *      writes to and reads from an existing pipe descriptor in one operation.
     * <li> <code>CreateFile</code>, <code>ReadFile</code>,
     *      <code>WriteFile</code>, and <code>CloseFile</code> A byte-type pipe can
     *      be opened, written to, read from and closed using the standard Win32
     *      file operations.
     * </ul>
     *
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 7.3K bytes
    - Viewed (0)
  7. internal/mountinfo/mountinfo_linux_test.go

    		/dev/2 /path/to/1/2 type2 flags,1,2=3 2 2
                    /dev/3 /path/to/1.1 type3 flags,1,2=3 3 3
    		`
    	var err error
    	dir := t.TempDir()
    	mountsPath := filepath.Join(dir, "mounts")
    	if err = os.WriteFile(mountsPath, []byte(successCase), 0o666); err != nil {
    		t.Fatal(err)
    	}
    	// Failure case where we detected successfully cross device mounts.
    	{
    		absPaths := []string{"/path/to/1"}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  8. docs_src/generate_clients/tutorial004.js

                const newOperationId = operationId.substring(toRemove.length)
                operation.operationId = newOperationId
              }
            }
          }
        }
    
        await fs.promises.writeFile(
          filePath,
          JSON.stringify(openapiContent, null, 2),
        )
        console.log('File successfully modified')
      } catch (err) {
        console.error('Error:', err)
      }
    }
    
    JavaScript
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 14 11:40:05 GMT 2024
    - 1K bytes
    - Viewed (0)
  9. lib/time/mkzip.go

    		log.Fatal(err)
    	}
    	if len(seen) == 0 {
    		log.Fatalf("did not find any files to add")
    	}
    	if !seen["US/Eastern"] {
    		log.Fatalf("did not find US/Eastern to add")
    	}
    	if err := os.WriteFile(args[0], zb.Bytes(), 0666); err != nil {
    		log.Fatal(err)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 17:32:07 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbNamedPipe.java

     * <li><code>TransactNamedPipe</code> A message-type pipe call that
     * writes to and reads from an existing pipe descriptor in one operation.
     * <li><code>CreateFile</code>, <code>ReadFile</code>,
     * <code>WriteFile</code>, and <code>CloseFile</code> A byte-type pipe can
     * be opened, written to, read from and closed using the standard Win32
     * file operations.
     * </ul>
     *
     * <p>
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 6K bytes
    - Viewed (0)
Back to top