zfs: the keeper tests make their socket directory in the test's own temporary directory
The group's check failed TestOnlyRootOpensTheKeepersSocketAndANeedlessKeeperIsTheBusDown and TestAKeeperThatDoesNotAnswerIsWarnedOnce: stat /var/tmp: no such file or directory. Builds: design 42 zfs-owns-zfs §18, A-37
This commit is contained in:
@@ -73,7 +73,7 @@ func TestOnlyRootOpensTheKeepersSocketAndANeedlessKeeperIsTheBusDown(t *testing.
|
|||||||
k := &Keeper{Emit: func(string, any) error { return nil }, States: st,
|
k := &Keeper{Emit: func(string, any) error { return nil }, States: st,
|
||||||
Call: func(string, any) (json.RawMessage, error) { return nil, errors.New("down") },
|
Call: func(string, any) (json.RawMessage, error) { return nil, errors.New("down") },
|
||||||
PeerOf: func(net.Conn) (int, error) { return uid, nil }}
|
PeerOf: func(net.Conn) (int, error) { return uid, nil }}
|
||||||
dir, err := os.MkdirTemp("/var/tmp", "zk")
|
dir, err := os.MkdirTemp("", "zk")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ func TestOnlyRootOpensTheKeepersSocketAndANeedlessKeeperIsTheBusDown(t *testing.
|
|||||||
// A-37: a root process whose keeper does not answer acts as with the bus down and says so, once, in a warning, for the
|
// A-37: a root process whose keeper does not answer acts as with the bus down and says so, once, in a warning, for the
|
||||||
// hand acts, the forgetting of applied keys and the pause alike.
|
// hand acts, the forgetting of applied keys and the pause alike.
|
||||||
func TestAKeeperThatDoesNotAnswerIsWarnedOnce(t *testing.T) {
|
func TestAKeeperThatDoesNotAnswerIsWarnedOnce(t *testing.T) {
|
||||||
dir, err := os.MkdirTemp("/var/tmp", "keeper-down")
|
dir, err := os.MkdirTemp("", "keeper-down")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user