Skip to content

Commit 08a70ce

Browse files
committed
Give locksmith its own test suite
and ensure tests can be run on mac [#145440343]
1 parent ca197ac commit 08a70ce

3 files changed

Lines changed: 36 additions & 0 deletions

File tree

store/locksmith/filesystem.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package locksmith // import "code.cloudfoundry.org/grootfs/store/locksmith"
2+
23
import "code.cloudfoundry.org/grootfs/groot"
34

45
const ExclusiveMetricsLockingTime = "ExclusiveLockingTime"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package locksmith_test
2+
3+
import (
4+
"os/user"
5+
"strconv"
6+
7+
. "github.com/onsi/ginkgo"
8+
. "github.com/onsi/gomega"
9+
10+
"testing"
11+
)
12+
13+
var (
14+
GrootUID uint32
15+
GrootGID uint32
16+
)
17+
18+
func TestManager(t *testing.T) {
19+
RegisterFailHandler(Fail)
20+
21+
BeforeSuite(func() {
22+
GrootUser, err := user.Lookup("groot")
23+
Expect(err).NotTo(HaveOccurred())
24+
25+
grootUID, err := strconv.ParseUint(GrootUser.Uid, 10, 32)
26+
Expect(err).NotTo(HaveOccurred())
27+
GrootUID = uint32(grootUID)
28+
29+
grootGID, err := strconv.ParseUint(GrootUser.Gid, 10, 32)
30+
Expect(err).NotTo(HaveOccurred())
31+
GrootGID = uint32(grootGID)
32+
})
33+
34+
RunSpecs(t, "Locksmith Suite")
35+
}

0 commit comments

Comments
 (0)