- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for tempfile (0.21 sec)
-
cmd/test-utils_test.go
// Fetch TLS key and pem files from test-data/ directory. // dir, _ := os.Getwd() // testDataDir := filepath.Join(filepath.Dir(dir), "test-data") // // pemFile := filepath.Join(testDataDir, "server.pem") // keyFile := filepath.Join(testDataDir, "server.key") cer, err := tls.X509KeyPair(cert, key) if err != nil { t.Fatalf("Failed to load certificate: %v", err) }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri May 03 17:26:51 GMT 2024 - 76.2K bytes - Viewed (0) -
internal/disk/stat_test.go
} for _, testCase := range testCases { testCase := testCase t.Run("", func(t *testing.T) { tmpfile, err := os.CreateTemp("", "testfile") if err != nil { t.Error(err) } tmpfile.WriteString(testCase.stat) tmpfile.Sync() tmpfile.Close() iostats, err := readDriveStats(tmpfile.Name()) if err != nil && !testCase.expectErr { t.Fatalf("unexpected err; %v", err) }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Feb 26 19:34:50 GMT 2024 - 3.6K bytes - Viewed (0) -
cmd/update_test.go
func TestGetHelmVersion(t *testing.T) { createTempFile := func(content string) string { tmpfile, err := os.CreateTemp("", "helm-testfile-") if err != nil { t.Fatalf("Unable to create temporary file. %s", err) } if _, err = tmpfile.WriteString(content); err != nil { t.Fatalf("Unable to create temporary file. %s", err) } if err = tmpfile.Close(); err != nil { t.Fatalf("Unable to create temporary file. %s", err) }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sat Mar 09 03:07:08 GMT 2024 - 10.7K bytes - Viewed (0) -
src/archive/tar/tar_test.go
"time" ) type testError struct{ error } type fileOps []any // []T where T is (string | int64) // testFile is an io.ReadWriteSeeker where the IO operations performed // on it must match the list of operations in ops. type testFile struct { ops fileOps pos int64 } func (f *testFile) Read(b []byte) (int, error) { if len(b) == 0 { return 0, nil } if len(f.ops) == 0 { return 0, io.EOF }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 15 16:01:50 GMT 2024 - 24K bytes - Viewed (0) -
src/archive/tar/writer_test.go
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Feb 27 16:39:23 GMT 2024 - 38.7K bytes - Viewed (0) -
src/archive/zip/reader_test.go
Name: "readme.zip", }, { Name: "readme.notzip", Error: ErrFormat, }, { Name: "dd.zip", File: []ZipTestFile{ { Name: "filename", Content: []byte("This is a test textfile.\n"), Modified: time.Date(2011, 2, 2, 13, 6, 20, 0, time.UTC), Mode: 0666, }, }, }, { // created in windows XP file manager. Name: "winxp.zip", File: []ZipTestFile{ {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 55.3K bytes - Viewed (0) -
cmd/xl-storage_test.go
// create xlStorage test setup storage, path, err := newXLStorageTestSetup(t) if err != nil { t.Fatalf("Unable to create xlStorage test setup, %s", err) } volName := "testvol" fileName := "testfile" if err := storage.MakeVol(context.Background(), volName); err != nil { t.Fatal(err) } // 1) Whole-file bitrot check on proper file size := int64(4*1024*1024 + 100*1024) // 4.1 MB
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 11 17:45:28 GMT 2024 - 66.7K bytes - Viewed (0)