Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro committed Dec 12, 2024
1 parent 8720eb8 commit a8af5d7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/internal/flags/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (s *AdminServer) serveWithListener(l net.Listener) (err error) {
recoveryHandler(s.mux),
)
if err != nil {
return err
return fmt.Errorf("failed to create admin server: %w", err)

Check warning on line 118 in cmd/internal/flags/admin.go

View check run for this annotation

Codecov / codecov/patch

cmd/internal/flags/admin.go#L118

Added line #L118 was not covered by tests
}
errorLog, _ := zap.NewStdLogAt(s.logger, zapcore.ErrorLevel)
s.server.ErrorLog = errorLog
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/flags/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestAdminFailToServe(t *testing.T) {
require.NoError(t, adminServer.initFromViper(v, logger))

adminServer.serveWithListener(l)
defer adminServer.Close()
t.Cleanup(func() { assert.NoError(t, adminServer.Close()) })

waitForEqual(t, healthcheck.Broken, func() any { return adminServer.HC().Get() })

Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/flags/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestStartErrors(t *testing.T) {
{
name: "bad admin TLS",
flags: []string{"--admin.http.tls.enabled=true", "--admin.http.tls.cert=invalid-cert"},
expErr: "cannot initialize admin server",
expErr: "cannot start the admin server: failed to load TLS config",
},
{
name: "bad host:port",
Expand Down

0 comments on commit a8af5d7

Please sign in to comment.