Skip to content

Commit

Permalink
#58 Working tests
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Jul 9, 2024
1 parent 3340544 commit 9efa294
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ A server supporting the following services:

var ContextVariablesForMultiPlatform = []option.ContextVariable{
option.Configuration,
option.DatabaseUrl,
option.EngineConfigurationJson,
option.DatabaseURL,
option.EngineConfigurationJSON,
option.EngineLogLevel,
option.EngineModuleName,
option.GrpcPort,
option.HttpPort,
option.HTTPPort,
option.LogLevel,
option.ObserverOrigin,
option.ObserverUrl,
option.ObserverURL,
option.ServerAddress,
option.TtyOnly,
option.XtermAllowedHostnames.SetDefault(getDefaultAllowedHostnames()),
Expand Down Expand Up @@ -129,7 +129,7 @@ func RunE(_ *cobra.Command, _ []string) error {

// Build configuration for Senzing engine.

senzingSettings, err := settings.BuildAndVerifySenzingEngineConfigurationJson(ctx, viper.GetViper())
senzingSettings, err := settings.BuildAndVerifySettings(ctx, viper.GetViper())
if err != nil {
return err
}
Expand All @@ -140,11 +140,11 @@ func RunE(_ *cobra.Command, _ []string) error {

// Setup gRPC server

grpcserver := &grpcserver.GrpcServerImpl{
grpcserver := &grpcserver.BasicGrpcServer{
EnableAll: true,
LogLevelName: viper.GetString(option.LogLevel.Arg),
ObserverOrigin: viper.GetString(option.ObserverOrigin.Arg),
ObserverUrl: viper.GetString(option.ObserverUrl.Arg),
ObserverURL: viper.GetString(option.ObserverURL.Arg),
Port: viper.GetInt(option.GrpcPort.Arg),
SenzingSettings: senzingSettings,
SenzingInstanceName: viper.GetString(option.EngineModuleName.Arg),
Expand All @@ -160,13 +160,13 @@ func RunE(_ *cobra.Command, _ []string) error {
LogLevelName: viper.GetString(option.LogLevel.Arg),
ObserverOrigin: viper.GetString(option.ObserverOrigin.Arg),
Observers: observers,
OpenApiSpecificationRest: senzingrestservice.OpenApiSpecificationJson,
OpenApiSpecificationRest: senzingrestservice.OpenAPISpecificationJSON,
ReadHeaderTimeout: 60 * time.Second,
SenzingEngineConfigurationJson: senzingSettings,
SenzingModuleName: viper.GetString(option.EngineModuleName.Arg),
SenzingVerboseLogging: viper.GetInt64(option.EngineLogLevel.Arg),
ServerAddress: viper.GetString(option.ServerAddress.Arg),
ServerPort: viper.GetInt(option.HttpPort.Arg),
ServerPort: viper.GetInt(option.HTTPPort.Arg),
SwaggerUrlRoutePrefix: "swagger",
TtyOnly: viper.GetBool(option.TtyOnly.Arg),
XtermAllowedHostnames: viper.GetStringSlice(option.XtermAllowedHostnames.Arg),
Expand Down
2 changes: 1 addition & 1 deletion httpserver/httpserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (httpServer *HttpServerImpl) getSenzingRestApiProxyMux(ctx context.Context)
}

func (httpServer *HttpServerImpl) getEntitySearchMux(ctx context.Context) *http.ServeMux {
service := &entitysearchservice.HttpServiceImpl{}
service := &entitysearchservice.BasicHTTPService{}
return service.Handler(ctx)
}

Expand Down

0 comments on commit 9efa294

Please sign in to comment.