Sha256: 321b21d0c1c4acd76ae02c5b6137581c8c438011f96ddbc30b4625cd4b48b7d7

Contents?: true

Size: 399 Bytes

Versions: 12

Compression:

Stored size: 399 Bytes

Contents

package main

import (
	"testing"
)

func TestGetFileOwnerGroup(t *testing.T) {
	statFile = func(path string) string {
		return "foo:bar"
	}
	path := "/etc/passwd"

	owner, group := getFileOwnerGroup(path)

	if owner != "foo" {
		t.Errorf("GetFileOwner('%v') = '%v', want '%v'", path, owner, "foo")
	}
	if group != "bar" {
		t.Errorf("GetFileOwner('%v') = '%v', want '%v'", path, owner, "bar")
	}
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
machinery-tool-1.24.1 machinery-helper/file_utils_test.go
machinery-tool-1.24.0 machinery-helper/file_utils_test.go
machinery-tool-1.23.1 machinery-helper/file_utils_test.go
machinery-tool-1.23.0 machinery-helper/file_utils_test.go
machinery-tool-1.22.3 machinery-helper/file_utils_test.go
machinery-tool-1.22.2 machinery-helper/file_utils_test.go
machinery-tool-1.22.1 machinery-helper/file_utils_test.go
machinery-tool-1.22.0 machinery-helper/file_utils_test.go
machinery-tool-1.21.0 machinery-helper/file_utils_test.go
machinery-tool-1.20.0 machinery-helper/file_utils_test.go
machinery-tool-1.19.0 machinery-helper/file_utils_test.go
machinery-tool-1.18.0 machinery-helper/file_utils_test.go