From 379e4d7e4d2539f35d559d4b0752531e546238a9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 18 Dec 2017 15:07:24 -0500 Subject: nslcd_{server,systemd}: BREAKING CHANGE: use contexts --- nslcd_systemd/misc_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'nslcd_systemd/misc_test.go') diff --git a/nslcd_systemd/misc_test.go b/nslcd_systemd/misc_test.go index a75083d..bc7ace6 100644 --- a/nslcd_systemd/misc_test.go +++ b/nslcd_systemd/misc_test.go @@ -18,6 +18,7 @@ package nslcd_systemd_test import ( + "context" "fmt" "io/ioutil" "net" @@ -89,7 +90,7 @@ func testDriver( // server ////////////////////////////////////////////////////////////// errfatal(sdActivatedStream(t.tmpdir + "/nslcd.sock")) go func() { - evExitServer <- nslcd_systemd.Main(backend, limits) + evExitServer <- nslcd_systemd.Main(backend, limits, context.Background()) }() // client/driver /////////////////////////////////////////////////////// @@ -133,7 +134,7 @@ func (o *NonLockingBackend) Init() error { return nil } func (o *NonLockingBackend) Reload() error { return nil } func (o *NonLockingBackend) Close() {} -func (o *NonLockingBackend) Passwd_All(cred unix.Ucred, req nslcd_proto.Request_Passwd_All) <-chan nslcd_proto.Passwd { +func (o *NonLockingBackend) Passwd_All(ctx context.Context, req nslcd_proto.Request_Passwd_All) <-chan nslcd_proto.Passwd { ret := make(chan nslcd_proto.Passwd) go func() { defer close(ret) @@ -170,7 +171,7 @@ func (o *LockingBackend) Close() { o.NonLockingBackend.Close() } -func (o *LockingBackend) Passwd_All(cred unix.Ucred, req nslcd_proto.Request_Passwd_All) <-chan nslcd_proto.Passwd { +func (o *LockingBackend) Passwd_All(ctx context.Context, req nslcd_proto.Request_Passwd_All) <-chan nslcd_proto.Passwd { o.lock.RLock() ret := make(chan nslcd_proto.Passwd) go func() { -- cgit v1.2.3