Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro committed Aug 2, 2022
1 parent 79375c3 commit 81fcfee
Show file tree
Hide file tree
Showing 4 changed files with 621 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/remote-storage/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package app

import (
"fmt"
"net"

"go.uber.org/zap"
Expand Down Expand Up @@ -104,7 +105,7 @@ func createGRPCServer(opts *Options, tm *tenancy.TenancyManager, handler *shared
if opts.TLSGRPC.Enabled {
tlsCfg, err := opts.TLSGRPC.Config(logger)
if err != nil {
return nil, err
return nil, fmt.Errorf("invalid TLS config: %w", err)
}
creds := credentials.NewTLS(tlsCfg)
grpcOpts = append(grpcOpts, grpc.Creds(creds))
Expand Down Expand Up @@ -138,11 +139,10 @@ func (s *Server) Start() error {
if err := s.initListener(); err != nil {
return err
}
s.logger.Info("Starting GRPC server", zap.Stringer("addr", s.grpcConn.Addr()))
go func() {
s.logger.Info("Starting GRPC server", zap.String("addr", s.opts.GRPCHostPort))

if err := s.grpcServer.Serve(s.grpcConn); err != nil {
s.logger.Error("Could not start GRPC server", zap.Error(err))
s.logger.Error("GRPC server exited", zap.Error(err))
}
s.unavailableChannel <- healthcheck.Unavailable
}()
Expand Down
Loading

0 comments on commit 81fcfee

Please sign in to comment.