Skip to content

Commit c35053f

Browse files
committed
add shutdown to tests
1 parent d4f6e5c commit c35053f

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

clamd_test.go

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,6 @@ func TestScanAll(t *testing.T) {
118118
}
119119
}
120120

121-
//func TestShutdown(t *testing.T) {
122-
// clamd, teardown := setupTest(t)
123-
// defer teardown(t)
124-
// got, err := clamd.Shutdown(context.Background())
125-
// if err != nil {
126-
// t.Errorf("%v", err)
127-
// }
128-
// if !got {
129-
// t.Errorf("clamd.Shutdown() = %v; want true", got)
130-
// }
131-
//}
132-
133121
func TestStats(t *testing.T) {
134122
clamd := NewClamd()
135123

@@ -141,3 +129,14 @@ func TestStats(t *testing.T) {
141129
t.Errorf("clamd.ScanAll() = %v; want Stats", got)
142130
}
143131
}
132+
133+
func TestShutdown(t *testing.T) {
134+
clamd := NewClamd()
135+
got, err := clamd.Shutdown(context.Background())
136+
if err != nil {
137+
t.Errorf("%v", err)
138+
}
139+
if !got {
140+
t.Errorf("clamd.Shutdown() = %v; want true", got)
141+
}
142+
}

0 commit comments

Comments
 (0)