- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for tempDir (0.28 sec)
-
cmd/os-readdir_test.go
// Add empty entry slice for this test directory. testResults = append(testResults, result{t.TempDir(), []string{}}) return testResults } // Test to read non-empty directory with only files. func setupTestReadDirFiles(t *testing.T) (testResults []result) { dir := t.TempDir() entries := []string{} for i := 0; i < 10; i++ { name := fmt.Sprintf("file-%d", i)
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) -
cmd/xl-storage_windows_test.go
{"/a/b/c/d/e/f/g", true}, {string(bytes.Repeat([]byte("界"), 85)), true}, // Each path component must be <= 255 bytes long. {string(bytes.Repeat([]byte("界"), 280)), false}, {`/p/q/r/s/t`, true}, } dir := t.TempDir() // Instantiate posix object to manage a disk fs, err := newLocalXLStorage(dir) if err != nil { t.Fatal(err) } // Create volume to use in conjunction with other StorageAPI's file API(s)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Wed Nov 29 06:35:16 GMT 2023 - 2.8K bytes - Viewed (0) -
cmd/xl-storage_unix_test.go
func getUmask() int { mask := syscall.Umask(0) syscall.Umask(mask) return mask } // Tests if the directory and file creations happen with proper umask. func TestIsValidUmaskVol(t *testing.T) { tmpPath := t.TempDir() testCases := []struct { volName string expectedUmask int }{ {"is-this-valid", getUmask()}, } testCase := testCases[0] // Initialize a new xlStorage layer.
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Jul 25 19:37:26 GMT 2022 - 3.4K bytes - Viewed (0) -
internal/disk/disk_test.go
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Jul 31 22:20:48 GMT 2023 - 1.1K bytes - Viewed (0) -
internal/store/queuestore_test.go
"path/filepath" "reflect" "strings" "testing" ) type TestItem struct { Name string `json:"Name"` Property string `json:"property"` } var ( // TestDir queueDir = filepath.Join(os.TempDir(), "minio_test") // Sample test item. testItem = TestItem{Name: "test-item", Property: "property"} // Ext for test item testItemExt = ".test" ) // Initialize the queue store.
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Apr 04 17:52:24 GMT 2023 - 5.9K bytes - Viewed (0) -
cmd/xl-storage_test.go
tmpDir := t.TempDir() disk, err := newLocalXLStorage(tmpDir) if err != nil { t.Fatal(err) } disk.MakeVol(context.Background(), volume) if _, err := disk.readMetadata(context.Background(), pathJoin(tmpDir, volume, object)); err != errFileNameTooLong {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 11 17:45:28 GMT 2024 - 66.7K bytes - Viewed (0) -
internal/lock/lock_test.go
} }() _, err = LockedOpenFile(f.Name(), os.O_APPEND, 0o600) if err == nil { t.Fatal("Should fail here") } } // Tests lock directory fail. func TestLockDirFail(t *testing.T) { d := t.TempDir() _, err := LockedOpenFile(d, os.O_APPEND, 0o600) if err == nil { t.Fatal("Should fail here") } } // Tests rwlock methods. func TestRWLockedFile(t *testing.T) { f, err := os.CreateTemp("", "lock")
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 3.6K bytes - Viewed (0) -
cmd/storage-rest_test.go
}() // tg[0] = local, tg[1] = remote // Remote URL url, err := xnet.ParseHTTPURL(tg.Servers[1].URL) if err != nil { t.Fatalf("unexpected error %v", err) } url.Path = t.TempDir() globalMinioHost, globalMinioPort = mustSplitHostPort(url.Host) endpoint, err := NewEndpoint(url.String()) if err != nil { t.Fatalf("NewEndpoint failed %v", endpoint) }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Tue Jan 30 20:43:25 GMT 2024 - 11.4K bytes - Viewed (0) -
internal/mountinfo/mountinfo_linux_test.go
/dev/1 /path/to/1 type1 flags 1 1 /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. {
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) -
cmd/bitrot_test.go
package cmd import ( "context" "io" "testing" ) func testBitrotReaderWriterAlgo(t *testing.T, bitrotAlgo BitrotAlgorithm) { tmpDir := t.TempDir() volume := "testvol" filePath := "testfile" disk, err := newLocalXLStorage(tmpDir) if err != nil { t.Fatal(err) } disk.MakeVol(context.Background(), volume) writer := newBitrotWriter(disk, "", volume, filePath, 35, bitrotAlgo, 10)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Tue Jan 30 20:43:25 GMT 2024 - 2.1K bytes - Viewed (0)