Skip to content

Commit

Permalink
Some PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Skemba committed Jul 7, 2021
1 parent bb5aea0 commit 87ec3a1
Show file tree
Hide file tree
Showing 8 changed files with 389 additions and 410 deletions.
3 changes: 2 additions & 1 deletion pkg/analytics/analytics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/pyroscope-io/pyroscope/pkg/server"
"github.com/pyroscope-io/pyroscope/pkg/storage"
"github.com/pyroscope-io/pyroscope/pkg/testing"
"github.com/sirupsen/logrus"
)

const durThreshold = 30 * time.Millisecond
Expand Down Expand Up @@ -54,7 +55,7 @@ var _ = Describe("analytics", func() {
s, err := storage.New(&(*cfg).Server)
Expect(err).ToNot(HaveOccurred())

c, _ := server.New(&(*cfg).Server, s)
c, _ := server.New(&(*cfg).Server, s, logrus.New())
analytics := NewService(&(*cfg).Server, s, c)

startTime := time.Now()
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func newServerService(logger *logrus.Logger, c *config.Server) (*serverService,
if err != nil {
return nil, fmt.Errorf("new storage: %v", err)
}
svc.controller, err = server.New(svc.config, svc.storage)
svc.controller, err = server.New(svc.config, svc.storage, svc.logger)
if err != nil {
return nil, fmt.Errorf("new server: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ type Server struct {
GithubAuthURL string `def:"https://github.com/login/oauth/authorize" desc:"auth url for Github API"`
GithubTokenURL string `def:"https://github.com/login/oauth/access_token" desc:"token url for Github API"`

JWTSecret string `def:"qC8=%q~'z'o'CBi" desc:"secret used to secure your JWT tokens"`
JWTSecret string `def:"" desc:"secret used to secure your JWT tokens"`
LoginMaximumLifetimeDays int `def:"0" desc:"amount of days after which user will be logged out. 0 means non-expiring."`
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/server/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/sirupsen/logrus"

"github.com/pyroscope-io/pyroscope/pkg/config"
"github.com/pyroscope-io/pyroscope/pkg/storage"
Expand All @@ -26,7 +27,7 @@ var _ = Describe("server", func() {
(*cfg).Server.APIBindAddr = ":10044"
s, err := storage.New(&(*cfg).Server)
Expect(err).ToNot(HaveOccurred())
c, _ := New(&(*cfg).Server, s)
c, _ := New(&(*cfg).Server, s, logrus.New())
httpServer := httptest.NewServer(c.mux())
defer httpServer.Close()

Expand Down
3 changes: 2 additions & 1 deletion pkg/server/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/sirupsen/logrus"

"github.com/pyroscope-io/pyroscope/pkg/config"
"github.com/pyroscope-io/pyroscope/pkg/storage"
Expand All @@ -25,7 +26,7 @@ var _ = Describe("server", func() {
(*cfg).Server.APIBindAddr = ":10045"
s, err := storage.New(&(*cfg).Server)
Expect(err).ToNot(HaveOccurred())
c, _ := New(&(*cfg).Server, s)
c, _ := New(&(*cfg).Server, s, logrus.New())
httpServer := httptest.NewServer(c.mux())
defer httpServer.Close()

Expand Down
Loading

0 comments on commit 87ec3a1

Please sign in to comment.