Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dependabot/github_act…
Browse files Browse the repository at this point in the history
…ions/actions/add-to-project-0.6.0
  • Loading branch information
docktermj committed Mar 14, 2024
2 parents 91c1a58 + f498f63 commit 9fa487f
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 57 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

-

## [0.7.0] - 2024-03-14

### Changed in 0.7.0

- Updated dependencies
- Deleted methods not used in V4

## [0.6.0] - 2024-01-29

### Changed in 0.6.0
Expand Down
13 changes: 6 additions & 7 deletions factory/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ var (
// ----------------------------------------------------------------------------

func getTestObjectLocal(ctx context.Context, test *testing.T) SdkAbstractFactory {
_ = ctx
_ = test
if sdkAbstractFactoryLocalSingleton == nil {
sdkAbstractFactoryLocalSingleton = &SdkAbstractFactoryImpl{}
}
return sdkAbstractFactoryLocalSingleton
}

func getTestObjectGrpc(ctx context.Context, test *testing.T) SdkAbstractFactory {
_ = ctx
_ = test
if sdkAbstractFactoryGrpcSingleton == nil {
sdkAbstractFactoryGrpcSingleton = &SdkAbstractFactoryImpl{
GrpcTarget: "localhost:8261",
Expand All @@ -61,18 +65,13 @@ func printActual(test *testing.T, actual interface{}) {
}

func testError(test *testing.T, ctx context.Context, err error) {
_ = ctx
if err != nil {
test.Log("Error:", err.Error())
assert.FailNow(test, err.Error())
}
}

func testErrorNoFail(test *testing.T, ctx context.Context, err error) {
if err != nil {
test.Log("Error:", err.Error())
}
}

func errorId(err error) string {
var result string = ""
if err != nil {
Expand Down Expand Up @@ -178,7 +177,7 @@ func helperSdkAbstractFactoryImpl_GetG2diagnostic(test *testing.T, ctx context.C
if errorId(err) != "senzing-60134002" {
testError(test, ctx, err)
}
actual, err := g2diagnostic.GetTotalSystemMemory(ctx)
actual, err := g2diagnostic.CheckDBPerf(ctx, 1)
testError(test, ctx, err)
printActual(test, actual)
}
Expand Down
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ go 1.21

require (
github.com/aquilax/truncate v1.0.0
github.com/senzing-garage/g2-sdk-go v0.9.0
github.com/senzing-garage/g2-sdk-go-base v0.5.0
github.com/senzing-garage/g2-sdk-go-grpc v0.6.0
github.com/senzing-garage/g2-sdk-proto/go v0.0.0-20240126210601-d02d3beb81d4
github.com/senzing-garage/g2-sdk-go v0.10.1
github.com/senzing-garage/g2-sdk-go-base v0.6.1
github.com/senzing-garage/g2-sdk-go-grpc v0.7.0
github.com/senzing-garage/g2-sdk-proto/go v0.0.0-20240229231149-cd5a92459976
github.com/senzing-garage/go-common v0.4.0
github.com/senzing-garage/go-logging v1.4.0
github.com/senzing-garage/go-observing v0.3.0
github.com/stretchr/testify v1.8.4
google.golang.org/grpc v1.62.0
github.com/stretchr/testify v1.9.0
google.golang.org/grpc v1.62.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/senzing-garage/go-messaging v1.4.0 // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314204616-9694c7771956 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
53 changes: 24 additions & 29 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ github.com/aquilax/truncate v1.0.0 h1:UgIGS8U/aZ4JyOJ2h3xcF5cSQ06+gGBnjxH2RUHJe0
github.com/aquilax/truncate v1.0.0/go.mod h1:BeMESIDMlvlS3bmg4BVvBbbZUNwWtS8uzYPAKXwwhLw=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
Expand All @@ -16,14 +14,14 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/senzing-garage/g2-sdk-go v0.9.0 h1:Noa62gKeY5opeUwIi7/VHKjDR/VX21BZiooqt1ewJBI=
github.com/senzing-garage/g2-sdk-go v0.9.0/go.mod h1:09Rk4ZnOgXuN/uwnBHSs/TJ27IP8Dg7jW8vK4MWEEWY=
github.com/senzing-garage/g2-sdk-go-base v0.5.0 h1:qyf7vkncP7UCmpQqnDth0zErbLE2OboVYxXkGa1qJh4=
github.com/senzing-garage/g2-sdk-go-base v0.5.0/go.mod h1:ohjqSwsrzQJC9ugLwF7QB96UgT+4cqE9fHgOHqELkc0=
github.com/senzing-garage/g2-sdk-go-grpc v0.6.0 h1:fhJTOLDg3cIt8ImY/x2ZD2wpA/V0zxHf4yrM+WoHL90=
github.com/senzing-garage/g2-sdk-go-grpc v0.6.0/go.mod h1:DyOK3ZS/GsO1YOtgh19P/D1JaeEqIMCimZa//OJZQsk=
github.com/senzing-garage/g2-sdk-proto/go v0.0.0-20240126210601-d02d3beb81d4 h1:G++g9Eky1SrzDQzruhkG9MwWBlscc9RlAzWZScXMdcc=
github.com/senzing-garage/g2-sdk-proto/go v0.0.0-20240126210601-d02d3beb81d4/go.mod h1:Wc4apKs4NfTnCewdQZqS+KCO1BoxabG4DR/CTGA0968=
github.com/senzing-garage/g2-sdk-go v0.10.1 h1:A5pD8wtULp9VF5opZ4NQvklrcIwFu2HeXzTiyCqNRCU=
github.com/senzing-garage/g2-sdk-go v0.10.1/go.mod h1:Hd2r1UHpizQCMukOqOL8oCUYtU6Foi8M5WVQ5aLNx+Q=
github.com/senzing-garage/g2-sdk-go-base v0.6.1 h1:xomMDYm9ZMI4UitSoh4qg8MzFdw0cQ/CLLdII9/9RF8=
github.com/senzing-garage/g2-sdk-go-base v0.6.1/go.mod h1:XoFyKuLyt6VJt/R2+bxEnvmJe9TqKLoCWKNvrG3bAo8=
github.com/senzing-garage/g2-sdk-go-grpc v0.7.0 h1:XfVtqTQHp6U0sxhsekU2n0ClfdckkglKfc13wk3jYe4=
github.com/senzing-garage/g2-sdk-go-grpc v0.7.0/go.mod h1:etC3ZJQgsZsJbSyGZU8hBXCokuwTwalmg48qHoWDDKs=
github.com/senzing-garage/g2-sdk-proto/go v0.0.0-20240229231149-cd5a92459976 h1:TjxkyM2JeViHP336v19G+lwiDt/3B23JCQmC7v9g/8Q=
github.com/senzing-garage/g2-sdk-proto/go v0.0.0-20240229231149-cd5a92459976/go.mod h1:0+C/1C265Bl6xw+4Ts1GyiAGyJ1ZsVA5ay0tMr9BSyc=
github.com/senzing-garage/go-common v0.4.0 h1:/6/5yNY80udkbOzSAX0Vvx2+0kD9JF7fhqNUlRj2Vho=
github.com/senzing-garage/go-common v0.4.0/go.mod h1:f2EIjPzAcULG8eKUVebIUNS2qgMVcJRgmQY9fpBDF9E=
github.com/senzing-garage/go-logging v1.4.0 h1:i+mLVKmD26I2Dy1GBSd7O5MexHyVJoHak2joWn7oq+4=
Expand All @@ -32,25 +30,22 @@ github.com/senzing-garage/go-messaging v1.4.0 h1:XNnOsx4yHslhggNJkZD+p3/Fv/zwhbx
github.com/senzing-garage/go-messaging v1.4.0/go.mod h1:V/B3SZSZY7cw2Nc7rZQkLaJu/PRyDA4AbviccDRjW1I=
github.com/senzing-garage/go-observing v0.3.0 h1:uWKZtiW4dwQJx8i7Y+7QrdrBJ8NPSOTZu2+6q0gy1DI=
github.com/senzing-garage/go-observing v0.3.0/go.mod h1:Bxl4c7G9hQ8iqSxZp/omolUhmkEdrbCzLt0s0VkPdnw=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA=
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f h1:3CW0unweImhOzd5FmYuRsD4Y4oQFKZIjAnKbjV4WIrw=
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s=
google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk=
google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314204616-9694c7771956 h1:SKCjEQF4r2S22zjM8qqWq8g+GfDzugTZ9K71woPPcF8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314204616-9694c7771956/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk=
google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
12 changes: 3 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ var logger logging.LoggingInterface = nil
// ----------------------------------------------------------------------------

func getLogger(ctx context.Context) (logging.LoggingInterface, error) {
_ = ctx
loggerOptions := []interface{}{
&logging.OptionCallerSkip{Value: 3},
}
Expand Down Expand Up @@ -121,17 +122,10 @@ func demonstrateAddRecord(ctx context.Context, g2Engine g2api.G2engine) (string,
}

func demonstrateAdditionalFunctions(ctx context.Context, g2Diagnostic g2api.G2diagnostic, g2Engine g2api.G2engine, g2Product g2api.G2product) error {
// Using G2Diagnostic: Check physical cores.

actual, err := g2Diagnostic.GetPhysicalCores(ctx)
if err != nil {
failOnError(5300, err)
}
logger.Log(2002, actual)

// Using G2Engine: Purge repository.

err = g2Engine.PurgeRepository(ctx)
err := g2Diagnostic.PurgeRepository(ctx)
if err != nil {
failOnError(5301, err)
}
Expand All @@ -154,7 +148,7 @@ func demonstrateAdditionalFunctions(ctx context.Context, g2Diagnostic g2api.G2di

// Using G2Engine: Purge repository again.

err = g2Engine.PurgeRepository(ctx)
err = g2Diagnostic.PurgeRepository(ctx)
if err != nil {
failOnError(5304, err)
}
Expand Down
10 changes: 10 additions & 0 deletions makefiles/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ build-osarch-specific: linux/amd64

.PHONY: clean-osarch-specific
clean-osarch-specific:
@docker rm --force senzing-serve-grpc || true
@rm -rf $(TARGET_DIRECTORY) || true
@rm -f $(GOPATH)/bin/$(PROGRAM_NAME) || true
@rm -rf /tmp/sqlite || true
Expand All @@ -35,6 +36,15 @@ setup-osarch-specific:
@mkdir /tmp/sqlite
@cp testdata/sqlite/G2C.db /tmp/sqlite/G2C.db
@mkdir -p $(TARGET_DIRECTORY)/$(GO_OS)-$(GO_ARCH) || true
@docker run \
--detach \
--env SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@/tmp/sqlite/G2C.db \
--env SENZING_TOOLS_ENABLE_ALL=true \
--name senzing-serve-grpc \
--publish 8261:8261 \
--rm \
senzing/serve-grpc
@echo "senzing/senzing-tools server-grpc running in background."


.PHONY: test-osarch-specific
Expand Down

0 comments on commit 9fa487f

Please sign in to comment.