diff options
Diffstat (limited to 'service_test.go')
| -rw-r--r-- | service_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/service_test.go b/service_test.go index ba31192..712ee54 100644 --- a/service_test.go +++ b/service_test.go @@ -1,42 +1,42 @@ // SPDX-FileCopyrightText: 2025 M. Shulhan <ms@kilabit.info> // SPDX-License-Identifier: GPL-3.0-only -package lilin_test +package lilin import ( "testing" - "git.sr.ht/~shulhan/lilin" "git.sr.ht/~shulhan/lilin/internal" "git.sr.ht/~shulhan/pakakeh.go/lib/test" ) func TestServiceStart_HTTP(t *testing.T) { type testCase struct { - expReport lilin.ScanReport - cfg lilin.ServiceConfig + expReport ScanReport + cfg ServiceConfig } var listCase = []testCase{{ - cfg: lilin.ServiceConfig{ + cfg: ServiceConfig{ ID: `http_service`, Address: `http://` + dummyHTTPAddress + `/health`, }, - expReport: lilin.ScanReport{ + expReport: ScanReport{ ID: `http_service`, At: internal.Now(), Success: true, }, }} - var reportq = make(chan lilin.ScanReport, 1) + var reportq = make(chan ScanReport, 1) + var notifq = make(chan ScanReport, 1) for _, tcase := range listCase { - svc, err := lilin.NewService(tcase.cfg) + svc, err := NewService(tcase.cfg) if err != nil { t.Fatal(err) } - go svc.Start(reportq) + go svc.Start(reportq, notifq) var gotReport = <-reportq svc.Stop() |
