Skip to content

Commit

Permalink
add unit tests for transport server
Browse files Browse the repository at this point in the history
Signed-off-by: Alay Patel <[email protected]>
  • Loading branch information
alaypatel07 committed Nov 8, 2021
1 parent 6be4a93 commit 372ec51
Show file tree
Hide file tree
Showing 2 changed files with 405 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transport/stunnel/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func New(ctx context.Context, c client.Client, logger logr.Logger,

err = s.reconcileSecret(ctx, c)
if err != nil {
s.logger.Error(err, "unable to create stunnel server secret")
s.logger.Error(err, "unable to reconcile stunnel server secret")
return nil, err
}

Expand Down Expand Up @@ -256,7 +256,7 @@ func (s *server) getExistingCert(ctx context.Context, c client.Client) (*bytes.B
return nil, nil, false, nil
}

return bytes.NewBuffer(key), bytes.NewBuffer(crt), false, nil
return bytes.NewBuffer(key), bytes.NewBuffer(crt), true, nil
}

func (s *server) serverContainers() []corev1.Container {
Expand Down
Loading

0 comments on commit 372ec51

Please sign in to comment.