From 60c7fb98e5728782775843d48eb6b6c5e8a474e6 Mon Sep 17 00:00:00 2001 From: Benjamin Bengfort Date: Thu, 15 Jul 2021 11:01:41 -0400 Subject: [PATCH] fix tests --- pkg/version.go | 4 ++-- pkg/whisper.go | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkg/version.go b/pkg/version.go index edd5cb8..2d26d4f 100644 --- a/pkg/version.go +++ b/pkg/version.go @@ -12,8 +12,8 @@ const ( VersionMajor = 1 VersionMinor = 0 VersionPatch = 0 - VersionReleaseLevel = "alpha" - VersionReleaseNumber = 1 + VersionReleaseLevel = "" + VersionReleaseNumber = 0 ) // Version returns the semantic version for the current build. diff --git a/pkg/whisper.go b/pkg/whisper.go index 34c600e..e863b1b 100644 --- a/pkg/whisper.go +++ b/pkg/whisper.go @@ -58,10 +58,13 @@ func New(conf config.Config) (s *Server, err error) { s = &Server{conf: conf, errc: make(chan error, 1), healthy: false} // Create the vault to store secrets in (Google Secret Manager) - if s.vault, err = NewSecretManager(conf.Google); err != nil { - return nil, err + // TODO: if we're in test mode, create a mock secret manager + if conf.Mode != gin.TestMode { + if s.vault, err = NewSecretManager(conf.Google); err != nil { + return nil, err + } + log.Debug().Msg("connected to google secret manager") } - log.Debug().Msg("connected to google secret manager") // Create the router gin.SetMode(conf.Mode)