internaldata

package
v4.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ExampleOwnersCSV = `1,Alan
2,Barbara
4,Dellilah`
View Source
const ExampleQuotaCSV = `1,/disk/1,10,20
1,/disk/2,11,21
2,/disk/1,12,22
`

Variables

This section is empty.

Functions

func CreateOwnersCSV

func CreateOwnersCSV(t *testing.T, csv string) (string, error)

CreateOwnersCSV creates an owners csv files in a temp directory. Returns its path. You can use ExampleOwnersCSV as the csv data.

func CreateQuotasCSV

func CreateQuotasCSV(t *testing.T, csv string) string

CreateQuotasCSV creates a quotas csv file in a temp directory. Returns its path. You can use ExampleQuotaCSV as the csv data.

func RealGIDAndUID

func RealGIDAndUID() (int, int, string, string, error)

RealGIDAndUID returns the currently logged in user's gid and uid, and the corresponding group and user names.

func TestDGUTData

func TestDGUTData(t *testing.T, files []TestFile) string

Types

type TestFile

type TestFile struct {
	Path           string
	UID, GID       int
	NumFiles       int
	SizeOfEachFile int
	ATime, MTime   int
}

func CreateDefaultTestData

func CreateDefaultTestData(gidA, gidB, gidC, uidA, uidB int) []TestFile

func FakeFilesForDGUTDBForBasedirsTesting

func FakeFilesForDGUTDBForBasedirsTesting(gid, uid int) ([]string, []TestFile)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL