Skip to content

Commit

Permalink
extend graceful termination test
Browse files Browse the repository at this point in the history
so that we get most of the functionality
of the server turned on
  • Loading branch information
vroldanbet committed Mar 29, 2023
1 parent 588f2c0 commit b5886f0
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion pkg/cmd/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/authzed/spicedb/internal/datastore/memdb"
"github.com/authzed/spicedb/internal/logging"
"github.com/authzed/spicedb/pkg/cmd/util"

"github.com/stretchr/testify/require"
"go.uber.org/goleak"
Expand All @@ -20,7 +21,21 @@ func TestServerGracefulTermination(t *testing.T) {
ds, err := memdb.NewMemdbDatastore(0, 1*time.Second, 10*time.Second)
require.NoError(t, err)

c := ConfigWithOptions(&Config{}, WithPresharedKey("psk"), WithDatastore(ds))
c := ConfigWithOptions(
&Config{},
WithPresharedKey("psk"),
WithDatastore(ds),
WithGRPCServer(util.GRPCServerConfig{
Network: util.BufferedNetwork,
Enabled: true,
}),
WithNamespaceCacheConfig(CacheConfig{Enabled: true}),
WithDispatchCacheConfig(CacheConfig{Enabled: true}),
WithClusterDispatchCacheConfig(CacheConfig{Enabled: true}),
WithHTTPGateway(util.HTTPServerConfig{Enabled: true}),
WithDashboardAPI(util.HTTPServerConfig{Enabled: true}),
WithMetricsAPI(util.HTTPServerConfig{Enabled: true}),
)
rs, err := c.Complete(ctx)
require.NoError(t, err)

Expand Down

0 comments on commit b5886f0

Please sign in to comment.