6
6
7
7
"github.com/stretchr/testify/require"
8
8
9
- "cdr.dev/slog/sloggers/slogtest"
10
-
11
9
"github.com/coder/coder/v2/coderd/healthcheck"
12
10
"github.com/coder/coder/v2/codersdk"
13
11
"github.com/coder/coder/v2/testutil"
@@ -20,11 +18,8 @@ func TestWorkspaceProxies(t *testing.T) {
20
18
t .Parallel ()
21
19
22
20
ctx := testutil .Context (t , testutil .WaitShort )
23
- log := slogtest .Make (t , nil )
24
21
rpt := healthcheck.WorkspaceProxyReport {}
25
- rpt .Run (ctx , & healthcheck.WorkspaceProxyReportOptions {
26
- Logger : log ,
27
- })
22
+ rpt .Run (ctx , & healthcheck.WorkspaceProxyReportOptions {})
28
23
29
24
require .True (t , rpt .Healthy , "expected report to be healthy" )
30
25
require .Empty (t , rpt .Warnings , "expected no warnings" )
@@ -35,7 +30,6 @@ func TestWorkspaceProxies(t *testing.T) {
35
30
t .Parallel ()
36
31
37
32
ctx := testutil .Context (t , testutil .WaitShort )
38
- log := slogtest .Make (t , nil )
39
33
rpt := healthcheck.WorkspaceProxyReport {}
40
34
rpt .Run (ctx , & healthcheck.WorkspaceProxyReportOptions {
41
35
CurrentVersion : "v2.34.5" ,
@@ -45,7 +39,6 @@ func TestWorkspaceProxies(t *testing.T) {
45
39
}, nil
46
40
},
47
41
UpdateProxyHealth : func (context.Context ) error { return nil },
48
- Logger : log ,
49
42
})
50
43
51
44
require .True (t , rpt .Healthy , "expected report to be healthy" )
@@ -57,7 +50,6 @@ func TestWorkspaceProxies(t *testing.T) {
57
50
t .Parallel ()
58
51
59
52
ctx := testutil .Context (t , testutil .WaitShort )
60
- log := slogtest .Make (t , nil )
61
53
rpt := healthcheck.WorkspaceProxyReport {}
62
54
rpt .Run (ctx , & healthcheck.WorkspaceProxyReportOptions {
63
55
CurrentVersion : "v2.34.5" ,
@@ -70,7 +62,6 @@ func TestWorkspaceProxies(t *testing.T) {
70
62
}, nil
71
63
},
72
64
UpdateProxyHealth : func (context.Context ) error { return nil },
73
- Logger : log ,
74
65
})
75
66
76
67
require .True (t , rpt .Healthy , "expected report to be healthy" )
@@ -82,7 +73,6 @@ func TestWorkspaceProxies(t *testing.T) {
82
73
t .Parallel ()
83
74
84
75
ctx := testutil .Context (t , testutil .WaitShort )
85
- log := slogtest .Make (t , nil )
86
76
rpt := healthcheck.WorkspaceProxyReport {}
87
77
rpt .Run (ctx , & healthcheck.WorkspaceProxyReportOptions {
88
78
CurrentVersion : "v2.35.0" ,
@@ -94,7 +84,6 @@ func TestWorkspaceProxies(t *testing.T) {
94
84
},
95
85
}, nil
96
86
},
97
- Logger : log ,
98
87
UpdateProxyHealth : func (context.Context ) error { return nil },
99
88
})
100
89
@@ -108,7 +97,6 @@ func TestWorkspaceProxies(t *testing.T) {
108
97
t .Parallel ()
109
98
110
99
ctx := testutil .Context (t , testutil .WaitShort )
111
- log := slogtest .Make (t , nil )
112
100
rpt := healthcheck.WorkspaceProxyReport {}
113
101
rpt .Run (ctx , & healthcheck.WorkspaceProxyReportOptions {
114
102
CurrentVersion : "v2.35.0" ,
@@ -120,7 +108,6 @@ func TestWorkspaceProxies(t *testing.T) {
120
108
},
121
109
}, nil
122
110
},
123
- Logger : log ,
124
111
UpdateProxyHealth : func (context.Context ) error { return nil },
125
112
})
126
113
0 commit comments