Skip to content

Commit

Permalink
#334 Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Oct 21, 2024
2 parents b1a2628 + 2fdcb7b commit 6fdc82a
Show file tree
Hide file tree
Showing 15 changed files with 108 additions and 50 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/go-test-darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Go test darwin
on: [pull_request, workflow_dispatch]

env:
CGO_LDFLAGS: "-Wl,-no_warn_duplicate_libraries"
DYLD_LIBRARY_PATH: /opt/senzing/er/lib:/opt/senzing/er/lib/macos
LD_LIBRARY_PATH: /opt/senzing/er/lib:/opt/senzing/er/lib/macos
SENZING_LOG_LEVEL: TRACE
Expand All @@ -18,7 +19,7 @@ jobs:
strategy:
matrix:
go: ["1.21"]
os: [macos-13]
os: [macos-latest]
senzingapi-version: [staging-v4]

steps:
Expand All @@ -38,7 +39,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Senzing API
uses: senzing-factory/github-action-install-senzing-api@v3
uses: senzing-factory/github-action-install-senzing-api@v4
with:
senzingapi-version: ${{ matrix.senzingapi-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go-test-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Senzing API
uses: senzing-factory/github-action-install-senzing-api@v3
uses: senzing-factory/github-action-install-senzing-api@v4
with:
senzingapi-runtime-version: ${{ matrix.senzingapi-version }}
senzingapi-version: ${{ matrix.senzingapi-version }}

- name: Copy /etc files
run: sudo mkdir -p /etc/opt/senzing && sudo cp testdata/senzing-license/g2.lic /etc/opt/senzing/g2.lic
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/go-test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Senzing API
uses: senzing-factory/github-action-install-senzing-api@v3
uses: senzing-factory/github-action-install-senzing-api@v4
with:
senzingapi-version: ${{ matrix.senzingapi-version }}

- name: Add to "Path" environment variable
run: printf "C:\Program Files\Senzing\er\lib" | Out-File -FilePath "$env:GITHUB_PATH" -Encoding utf8 -Append
run: |
# shellcheck disable=SC2028
echo "C:\Program Files\Senzing\er\lib" >> "$env:GITHUB_PATH"
- name: Copy /etc files
run: copy testdata/senzing-license/g2.lic "C:\Program Files\Senzing\er\etc\g2.lic"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
fetch-depth: 0

- name: Install Senzing API
uses: senzing-factory/github-action-install-senzing-api@v3
uses: senzing-factory/github-action-install-senzing-api@v4
with:
senzingapi-runtime-version: staging-v4
senzingapi-version: staging-v4

- name: Copy Senzing headers
run: |
Expand Down
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ and this project adheres to [Semantic Versioning].

-

## [0.8.3] - 2024-09-13
## [0.8.4] - 2024-10-09

### Changed in 0.8.3
### Changed in 0.8.4

- Make in-memory database
- Update dependencies

## [0.8.3] - 2024-10-01

### Added in 0.8.3

- Added `PreprocessRecord()`

## [0.8.2] - 2024-09-11

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Stages
# -----------------------------------------------------------------------------

ARG IMAGE_BUILDER=golang:1.22.3-bullseye
ARG IMAGE_BUILDER=golang:1.22.4-bullseye
ARG IMAGE_FINAL=senzing/senzingapi-runtime-staging:latest

# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -57,7 +57,7 @@ FROM ${IMAGE_FINAL} AS final
ENV REFRESHED_AT=2024-07-01
LABEL Name="senzing/serve-grpc" \
Maintainer="support@senzing.com" \
Version="0.7.6"
Version="0.8.3"
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "/app/healthcheck.sh" ]
USER root

Expand Down
12 changes: 6 additions & 6 deletions cmd/github.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// 0.8.3
// Created by senzing-factory/github-action-make-go-github-file.yaml on Wed Sep 11 18:28:15 UTC 2024
// 0.8.5
// Created by senzing-factory/github-action-make-go-github-file.yaml on Wed Oct 9 20:26:32 UTC 2024
//
//lint:file-ignore U1000 Ignore all unused code, it's generated
package cmd

var (
githubDate = "2024-09-11"
githubDate = "2024-10-09"
githubIteration = "0"
githubRef = "refs/tags/0.8.3"
githubRefName = "0.8.3"
githubRef = "refs/tags/0.8.5"
githubRefName = "0.8.5"
githubRepository = "senzing-garage/serve-grpc"
githubRepositoryName = "serve-grpc"
githubVersion = "0.8.3"
githubVersion = "0.8.5"
)
3 changes: 3 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,10 @@ Example:

```console
docker run \
--interactive \
--publish 8261:8261 \
--rm \
--tty \
senzing/serve-grpc

```
Expand Down Expand Up @@ -513,6 +515,7 @@ For other gRPC tools, visit [Awesome gRPC].
"iniParams": "{\"PIPELINE\":{\"CONFIGPATH\":\"/etc/opt/senzing\",\"RESOURCEPATH\":\"/opt/senzing/er/resources\",\"SUPPORTPATH\":\"/opt/senzing/data\"},\"SQL\":{\"CONNECTION\":\"sqlite3://na:na@nowhere/tmp/sqlite/G2C.db\"}}",
"verboseLogging": 0
}

```

1. Near the center, click the green "play" button.
Expand Down
20 changes: 10 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ require (
github.com/senzing-garage/go-helpers v0.6.1
github.com/senzing-garage/go-logging v1.5.1
github.com/senzing-garage/go-observing v0.3.3
github.com/senzing-garage/sz-sdk-go v0.14.1
github.com/senzing-garage/sz-sdk-go-core v0.8.2
github.com/senzing-garage/sz-sdk-proto v0.7.7
github.com/senzing-garage/sz-sdk-go v0.14.2
github.com/senzing-garage/sz-sdk-go-core v0.8.3
github.com/senzing-garage/sz-sdk-proto v0.7.10
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
google.golang.org/grpc v1.67.0
google.golang.org/grpc v1.67.1
)

require (
Expand All @@ -39,12 +39,12 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 // indirect
google.golang.org/protobuf v1.34.2 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
40 changes: 20 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ github.com/senzing-garage/go-messaging v1.5.2 h1:lU9W2HV3zKQsDU9Vs7lwe/C/LbHVCMn
github.com/senzing-garage/go-messaging v1.5.2/go.mod h1:iEWGVuDGWjolIkwLqnn9oJS7ifF3aoZjTtI44tf1gWQ=
github.com/senzing-garage/go-observing v0.3.3 h1:AhQYgOG012sDZtWXYcXVAaS5qEoDjlWmPYJDVCUZ/g0=
github.com/senzing-garage/go-observing v0.3.3/go.mod h1:qFUi5Dwb6vmd7izTZGjGbWKUGRHzWzsgbsX3oNSD198=
github.com/senzing-garage/sz-sdk-go v0.14.1 h1:bJOOHROg/SMEZ8KhCypVMr7scMzCuSpDpcMR9e4gzsA=
github.com/senzing-garage/sz-sdk-go v0.14.1/go.mod h1:9Kvr/NpNoU1DSKpVXmZ+91/WFMKvXmjuubFhAiS69Ts=
github.com/senzing-garage/sz-sdk-go-core v0.8.2 h1:IxJD3opnpYgUgRXYRdhQmitD2SlQIGVUCBHQERIAfW8=
github.com/senzing-garage/sz-sdk-go-core v0.8.2/go.mod h1:9yvVB0/YOW53a0JwSEdEKWCbSYSsaAmU+pRThpyNbK4=
github.com/senzing-garage/sz-sdk-proto v0.7.7 h1:yD2gL8OBo8h9UfSCORXB3ilCckW+9zdPC87jURIU0IQ=
github.com/senzing-garage/sz-sdk-proto v0.7.7/go.mod h1:CGtcd5FweXuIpOfbTlRPYCkk5Z0AmX6dGuVkMkRwNQ8=
github.com/senzing-garage/sz-sdk-go v0.14.2 h1:1LksQW0+epSY0DhlxThxrnfeDwgyLPvyqG9NehZmz04=
github.com/senzing-garage/sz-sdk-go v0.14.2/go.mod h1:rj9HH6qo+kW5PsFSRnEIUQqDZBE34gZjQGsDvAxw6dI=
github.com/senzing-garage/sz-sdk-go-core v0.8.3 h1:FlBRkqQd9QKPmr9KVVtG+FsoczqO+fXhRoZ9DnnvP0Y=
github.com/senzing-garage/sz-sdk-go-core v0.8.3/go.mod h1:uwAgQ/Ai8gKhJL/5TYMWYoDte7wnDqJXPWRD5A/Ushg=
github.com/senzing-garage/sz-sdk-proto v0.7.10 h1:T5T4W63awD9znLrDk94vVzgy1+GBb1ouEkCbtCqJans=
github.com/senzing-garage/sz-sdk-proto v0.7.10/go.mod h1:pvaLa5AR36n5T59Perh/zulKKPe6EB1HTWGhSP4smb4=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
Expand All @@ -70,20 +70,20 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 h1:N9BgCIAUvn/M+p4NJccWPWb3BWh88+zyL0ll9HgbEeM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw=
google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
2 changes: 1 addition & 1 deletion package.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# -----------------------------------------------------------------------------

ARG IMAGE_SENZINGAPI_RUNTIME=senzing/senzingapi-runtime-staging:latest
ARG IMAGE_BUILDER=golang:1.22.3-bullseye
ARG IMAGE_BUILDER=golang:1.22.4-bullseye
ARG IMAGE_FPM=dockter/fpm:latest
ARG IMAGE_FINAL=alpine

Expand Down
2 changes: 2 additions & 0 deletions szengineserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ var IDMessages = map[int]string{
162: "Exit " + Prefix + "GetObserverOrigin() returned (%v).",
163: "Enter " + Prefix + "SetObserverOrigin(%s).",
164: "Exit " + Prefix + "SetObserverOrigin(%s) returned (%v).",
165: "Enter " + Prefix + "PreprocessRecord(%+v).",
166: "Exit " + Prefix + "PreprocessRecord(%+v) returned (%v).",
601: "Send " + Prefix + "StreamExportCSVEntityReport(%+v) item(%s).",
602: "Send " + Prefix + "StreamExportJSONEntityReport(%+v) item(%s).",
4001: Prefix + "Destroy() not supported in gRPC",
Expand Down
15 changes: 15 additions & 0 deletions szengineserver/szengineserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,21 @@ func (server *SzEngineServer) HowEntityByEntityId(ctx context.Context, request *
return &response, err
}

func (server *SzEngineServer) PreprocessRecord(ctx context.Context, request *szpb.PreprocessRecordRequest) (*szpb.PreprocessRecordResponse, error) {
var err error
if server.isTrace {
entryTime := time.Now()
server.traceEntry(165, request)
defer func() { server.traceExit(166, request, err, time.Since(entryTime)) }()
}
szEngine := getSzEngine()
result, err := szEngine.PreprocessRecord(ctx, request.GetRecordDefinition(), request.GetFlags())
response := szpb.PreprocessRecordResponse{
Result: result,
}
return &response, err
}

func (server *SzEngineServer) PrimeEngine(ctx context.Context, request *szpb.PrimeEngineRequest) (*szpb.PrimeEngineResponse, error) {
var err error
if server.isTrace {
Expand Down
16 changes: 16 additions & 0 deletions szengineserver/szengineserver_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,22 @@ func ExampleSzEngineServer_HowEntityByEntityId() {
// Output: {"HOW_RESULTS":{"RESOLUTION_STEPS":[{"STEP":1,"VIRTUAL_ENTITY_1":{"VIRTUAL_ENTITY_ID":"V1","MEMBER_RECORDS":[{"INTERNAL_ID":1,"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1001"}]}]},"VIRTUAL_ENTITY_2":{"VIRTUAL_ENTITY_ID":"V2","MEMBER_RECORDS":[{"INTERNAL_ID":2,"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1002"}]}]},"INBOUND_VIRTUAL_ENTITY_ID":"V2","RESULT_VIRTUAL_ENTITY_ID":"V1-S1","MATCH_INFO":{"MATCH_KEY":"+NAME+DOB+PHONE","ERRULE_CODE":"CNAME_CFF_CEXCL"}},{"STEP":2,"VIRTUAL_ENTITY_1":{"VIRTUAL_ENTITY_ID":"V1-S1","MEMBER_RECORDS":[{"INTERNAL_ID":1,"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1001"}]},{"INTERNAL_ID":2,"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1002"}]}]},"VIRTUAL_ENTITY_2":{"VIRTUAL_ENTITY_ID":"V100001","MEMBER_RECORDS":[{"INTERNAL_ID":100001,"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1003"}]}]},"INBOUND_VIRTUAL_ENTITY_ID":"V1-S1","RESULT_VIRTUAL_ENTITY_ID":"V1-S2","MATCH_INFO":{"MATCH_KEY":"+NAME+DOB+EMAIL","ERRULE_CODE":"SF1_PNAME_CSTAB"}}],"FINAL_STATE":{"NEED_REEVALUATION":0,"VIRTUAL_ENTITIES":[{"VIRTUAL_ENTITY_ID":"V1-S2","MEMBER_RECORDS":[{"INTERNAL_ID":1,"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1001"}]},{"INTERNAL_ID":2,"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1002"}]},{"INTERNAL_ID":100001,"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1003"}]}]}]}}}
}

func ExampleSzEngineServer_PreprocessRecord() {
// For more information, visit https://github.com/senzing-garage/serve-grpc/blob/main/szengineserver/szengineserver_test.go
ctx := context.TODO()
szEngineServer := getSzEngineServer(ctx)
request := &szpb.PreprocessRecordRequest{
RecordDefinition: `{"DATA_SOURCE": "CUSTOMERS", "RECORD_ID": "1001", "RECORD_TYPE": "PERSON", "PRIMARY_NAME_LAST": "Smith", "PRIMARY_NAME_FIRST": "Robert", "DATE_OF_BIRTH": "12/11/1978", "ADDR_TYPE": "MAILING", "ADDR_LINE1": "123 Main Street, Las Vegas NV 89132", "PHONE_TYPE": "HOME", "PHONE_NUMBER": "702-919-1300", "EMAIL_ADDRESS": "bsmith@work.com", "DATE": "1/2/18", "STATUS": "Active", "AMOUNT": "100"}`,
Flags: senzing.SzWithoutInfo,
}
response, err := szEngineServer.PreprocessRecord(ctx, request)
if err != nil {
fmt.Println(err)
}
fmt.Println(response.GetResult())
// Output: {}
}

func ExampleSzEngineServer_PrimeEngine() {
// For more information, visit https://github.com/senzing-garage/serve-grpc/blob/main/szengineserver/szengineserver_test.go
ctx := context.TODO()
Expand Down
13 changes: 13 additions & 0 deletions szengineserver/szengineserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,19 @@ func TestSzEngineServer_HowEntityByEntityId(test *testing.T) {
printActual(test, response.GetResult())
}

func TestSzEngineServer_PreprocessRecord(test *testing.T) {
ctx := context.TODO()
szEngineServer := getTestObject(ctx, test)
record := truthset.CustomerRecords["1001"]
request := &szpb.PreprocessRecordRequest{
Flags: senzing.SzNoFlags,
RecordDefinition: record.JSON,
}
response, err := szEngineServer.PreprocessRecord(ctx, request)
require.NoError(test, err)
printActual(test, response.GetResult())
}

func TestSzEngineServer_PrimeEngine(test *testing.T) {
ctx := context.TODO()
szEngineServer := getTestObject(ctx, test)
Expand Down

0 comments on commit 6fdc82a

Please sign in to comment.