Skip to content

Commit

Permalink
Tink Server: Add basic smoke test for gRPC server:
Browse files Browse the repository at this point in the history
This should catch some runtime errors for the gRPC server.
There aren't any runtime tests or checks yet in the codebase so
this is just something to get us started.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
  • Loading branch information
jacobweinstock committed Sep 9, 2021
1 parent 42e5ad1 commit 848badd
Show file tree
Hide file tree
Showing 5 changed files with 667 additions and 32 deletions.
2 changes: 2 additions & 0 deletions cmd/tink-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/tinkerbell/tink/db"
rpcServer "github.com/tinkerbell/tink/grpc-server"
httpServer "github.com/tinkerbell/tink/http-server"
"github.com/tinkerbell/tink/metrics"
)

var (
Expand Down Expand Up @@ -133,6 +134,7 @@ func NewRootCommand(config *DaemonConfig, logger log.Logger) *cobra.Command {
// the most aggressive way we have to guarantee that
// the old way works as before.
config.PopulateFromLegacyEnvVar()
metrics.SetupMetrics(config.Facility, logger)

logger.Info("starting version " + version)

Expand Down
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@ require (
github.com/golang/protobuf v1.5.2
github.com/google/go-cmp v0.5.6
github.com/google/uuid v1.2.0
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/jedib0t/go-pretty v4.3.0+incompatible
github.com/lib/pq v1.2.1-0.20191011153232-f91d3411e481
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/ktr0731/evans v0.10.0
github.com/lib/pq v1.10.1
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/packethost/pkg v0.0.0-20200903155310-0433e0605550
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.8.1
Expand Down
Loading

0 comments on commit 848badd

Please sign in to comment.