Skip to content

Commit

Permalink
#264 Add testcase (#271)
Browse files Browse the repository at this point in the history
* #264 Add testcase

* #264 Savepoint

* #264 Update dependencies

* #264 Refactor to template-go

* #264 Add sql files

* #264 Delete old SQL files
  • Loading branch information
docktermj authored Sep 13, 2024
1 parent 0dfef26 commit e001e8f
Show file tree
Hide file tree
Showing 20 changed files with 818 additions and 217 deletions.
2 changes: 1 addition & 1 deletion .github/linters/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ linters:
- bidichk
- bodyclose
- contextcheck
- copyloopvar
- durationcheck
- errcheck
- errchkjson
- errorlint
- exhaustive
- exportloopref
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
Expand Down
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
[markdownlint](https://dlaa.me/markdownlint/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog], [markdownlint],
and this project adheres to [Semantic Versioning].

## [Unreleased]

-

## [0.7.1] - 2024-09-13

### Changed in 0.7.1

- Update dependencies

## [0.7.0] - 2024-08-29

### Changed in 0.7.0
Expand Down Expand Up @@ -284,3 +289,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added to 0.1.0

- Initial artifacts

[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
[markdownlint]: https://dlaa.me/markdownlint/
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at <[email protected]>. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
2 changes: 1 addition & 1 deletion 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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ BUILD_VERSION := $(shell git describe --always --tags --abbrev=0 --dirty | sed
DOCKER_CONTAINER_NAME := $(PROGRAM_NAME)
DOCKER_IMAGE_NAME := senzing/$(PROGRAM_NAME)
DOCKER_BUILD_IMAGE_NAME := $(DOCKER_IMAGE_NAME)-build
DOCKER_SUT_IMAGE_NAME := $(PROGRAM_NAME)_sut
GIT_REMOTE_URL := $(shell git config --get remote.origin.url)
GIT_REPOSITORY_NAME := $(shell basename `git rev-parse --show-toplevel`)
GIT_VERSION := $(shell git describe --always --tags --long --dirty | sed -e 's/\-0//' -e 's/\-g.......//')
Expand Down Expand Up @@ -69,11 +70,10 @@ hello-world: hello-world-osarch-specific
# -----------------------------------------------------------------------------

.PHONY: dependencies-for-development
dependencies-for-development:
dependencies-for-development: dependencies-for-development-osarch-specific
@go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
@go install github.com/vladopajic/go-test-coverage/v2@latest
@go install golang.org/x/tools/cmd/godoc@latest
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.58.1


.PHONY: dependencies
Expand Down
24 changes: 14 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/senzing-garage/init-database

go 1.21.0
go 1.22.4

toolchain go1.22.0
toolchain go1.23.1

retract (
v0.1.8
Expand All @@ -17,14 +17,14 @@ retract (
)

require (
github.com/senzing-garage/go-cmdhelping v0.3.0
github.com/senzing-garage/go-databasing v0.5.1
github.com/senzing-garage/go-cmdhelping v0.3.1
github.com/senzing-garage/go-databasing v0.5.2
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/go-sdk-abstract-factory v0.9.1
github.com/senzing-garage/go-sdk-abstract-factory v0.9.2
github.com/senzing-garage/sz-sdk-go v0.14.1
github.com/senzing-garage/sz-sdk-go-core v0.8.1
github.com/senzing-garage/sz-sdk-go-core v0.8.2
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
Expand All @@ -36,7 +36,10 @@ require (
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-sql-driver/mysql v1.8.1 // indirect
github.com/godror/godror v0.44.7 // indirect
github.com/godror/knownpb v0.2.0 // indirect
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
github.com/golang-sql/sqlexp v0.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand All @@ -47,22 +50,23 @@ require (
github.com/microsoft/go-mssqldb v1.7.2 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/senzing-garage/go-messaging v1.5.2 // indirect
github.com/senzing-garage/sz-sdk-go-grpc v0.8.1 // indirect
github.com/senzing-garage/sz-sdk-go-mock v0.8.0 // indirect
github.com/senzing-garage/sz-sdk-proto v0.7.6 // indirect
github.com/senzing-garage/sz-sdk-go-grpc v0.8.2 // indirect
github.com/senzing-garage/sz-sdk-go-mock v0.8.1 // indirect
github.com/senzing-garage/sz-sdk-proto v0.7.7 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
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/crypto v0.27.0 // indirect
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // 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
Expand Down
50 changes: 34 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occ
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h1:bTSOgj05NGRuHHhQwAdPnYr9TOdNmKlZTgGLL6nyAdI=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/UNO-SOFT/zlog v0.8.1 h1:TEFkGJHtUfTRgMkLZiAjLSHALjwSBdw6/zByMC5GJt4=
github.com/UNO-SOFT/zlog v0.8.1/go.mod h1:yqFOjn3OhvJ4j7ArJqQNA+9V+u6t9zSAyIZdWdMweWc=
github.com/aquilax/truncate v1.0.0 h1:UgIGS8U/aZ4JyOJ2h3xcF5cSQ06+gGBnjxH2RUHJe0U=
github.com/aquilax/truncate v1.0.0/go.mod h1:BeMESIDMlvlS3bmg4BVvBbbZUNwWtS8uzYPAKXwwhLw=
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
Expand All @@ -23,8 +25,16 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4=
github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
github.com/godror/godror v0.44.7 h1:fGxtxozidwBR3C1FVTrMiH77maOnMA4HqltDS/YM7O0=
github.com/godror/godror v0.44.7/go.mod h1:KJwMtQpK9o3WdEiNw7qvgSk827YDLj9MV/bXSzvUzlo=
github.com/godror/knownpb v0.2.0 h1:RJLntksFiKUHoUz3wCCJ8+DBjxSLYHYDNl1xRz0/gXI=
github.com/godror/knownpb v0.2.0/go.mod h1:kRahRJBwqTenpVPleymQ4k433Xz2Wuy7dOeFSuEpmkI=
github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw=
github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
Expand Down Expand Up @@ -55,10 +65,14 @@ github.com/microsoft/go-mssqldb v1.7.2 h1:CHkFJiObW7ItKTJfHo1QX7QBBD1iV+mn1eOyRP
github.com/microsoft/go-mssqldb v1.7.2/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/oklog/ulid/v2 v2.0.2 h1:r4fFzBm+bv0wNKNh5eXTwU7i85y5x+uwkxCUTNVQqLc=
github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68=
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo=
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
Expand All @@ -69,10 +83,10 @@ github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3
github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0=
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
github.com/senzing-garage/go-cmdhelping v0.3.0 h1:6Yo6tYdYXrCuMwsOKdAErwPGvCi8y9PAFV2UVPOffi0=
github.com/senzing-garage/go-cmdhelping v0.3.0/go.mod h1:J6M/yRqP9ZrwuEQFyxZ9JwkvMis8lZeR4Ot4G0u5YMc=
github.com/senzing-garage/go-databasing v0.5.1 h1:gi/2oABPnMNS1toP61ChwfZH/TKQLvT4fiWeeTCcYTA=
github.com/senzing-garage/go-databasing v0.5.1/go.mod h1:5QdDD/UVH+Q3FCgDergPliisCqNksVggwCHIIhg55m8=
github.com/senzing-garage/go-cmdhelping v0.3.1 h1:MCAvjx1kv3yEob1gPv4cUQ+fIrE1C/6bMBw8HbdyEqo=
github.com/senzing-garage/go-cmdhelping v0.3.1/go.mod h1:JTEcyT9VnuwqxSAolhtZEJB2IbdsFyv5KmEeoKHrUsU=
github.com/senzing-garage/go-databasing v0.5.2 h1:BikebZHRbOoASnXmt6Gf8jHuvguEuZSGqECqFrdozLY=
github.com/senzing-garage/go-databasing v0.5.2/go.mod h1:Tjb6+HqBWNHh6921vF6T+sxKkcAfoOVfuD+noaAg6bI=
github.com/senzing-garage/go-helpers v0.6.1 h1:wxQljvwix3sN7/PkWvWdBKli40lEXpEpaagCJa/336Y=
github.com/senzing-garage/go-helpers v0.6.1/go.mod h1:zLNSiNeI3o0kRjfigSdT5G5GxCXvQlD3iciychF17KA=
github.com/senzing-garage/go-logging v1.5.1 h1:3nqw75gN5x+6PQRop34/49+3kag1aE9dlFne7pILQAg=
Expand All @@ -81,18 +95,18 @@ 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/go-sdk-abstract-factory v0.9.1 h1:gcU9VrF1vgTEhTeKGry8lGf3+B/C7oWkyPzlVKtoM24=
github.com/senzing-garage/go-sdk-abstract-factory v0.9.1/go.mod h1:FjnxkUBOlANvm9g+ERhMasQ7mmwpT/4dlk2qr21RlPQ=
github.com/senzing-garage/go-sdk-abstract-factory v0.9.2 h1:jho2zzi/M+u5RoXTobqzjW2/Rt/yD2qL86uS715s9Cs=
github.com/senzing-garage/go-sdk-abstract-factory v0.9.2/go.mod h1:+XfiCxZfPgCYzqv5gv7OiEGzof6q/xMqF1dr/rpozqw=
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.1 h1:cONM0+0UxqrNbeXja0fUOnof1NVqJAui3B212BwgmDc=
github.com/senzing-garage/sz-sdk-go-core v0.8.1/go.mod h1:n86mrlWjLnrJLDSAxnNCPji0ycKUI2WoBJ7iXMHKqJM=
github.com/senzing-garage/sz-sdk-go-grpc v0.8.1 h1:mlspwOcI19US2kyrMRg3V5BzDb4X35EHc7rUMLuebIM=
github.com/senzing-garage/sz-sdk-go-grpc v0.8.1/go.mod h1:KhtyoLzpQGsBvYoV6p/I29CgV5WL5H5Ze9I/pWOm/Do=
github.com/senzing-garage/sz-sdk-go-mock v0.8.0 h1:ucDEaJ9Qli2YO5dOFlrM5n1uR9+WF6Xdrmu7HOv3Pjg=
github.com/senzing-garage/sz-sdk-go-mock v0.8.0/go.mod h1:W9xAwNEq7DIc5pUYcTg2vRkGwnKluqtQC8uHejU53Yk=
github.com/senzing-garage/sz-sdk-proto v0.7.6 h1:mHiZr094UTBcRW1OkNam1Pu/pMLZRO/4cIIyjQ/yDlY=
github.com/senzing-garage/sz-sdk-proto v0.7.6/go.mod h1:7CZSZ5yEVmT2T0yiijjdq7dWsdQ/KtRgvKRqCy+j7SI=
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-go-grpc v0.8.2 h1:kN9OzV0it2Tp1auwD3GCiaFV2ujcj3tQdB+0ruL0YuM=
github.com/senzing-garage/sz-sdk-go-grpc v0.8.2/go.mod h1:GBAplxSQJxdKXVF0n45BgTXH/Pvl0Js2MoI+MqAeoTs=
github.com/senzing-garage/sz-sdk-go-mock v0.8.1 h1:2uyJoB15X/tXv4VhcjTgTp1ZPl33BNBTxko2GE0395M=
github.com/senzing-garage/sz-sdk-go-mock v0.8.1/go.mod h1:QPxBHeZ6+MME0hf8/7b3793G9cvtQXF26BtEi8ZEqRM=
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/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 @@ -113,12 +127,16 @@ 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/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
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/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
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/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM=
golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8=
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-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ=
Expand Down
36 changes: 20 additions & 16 deletions initializer/initializer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,26 @@ func TestBasicInitializer_SetObserverOrigin(test *testing.T) {
testObject.SetObserverOrigin(ctx, "TestObserver")
}

// func TestBasicInitializer_UnregisterObserver(test *testing.T) {
// ctx := context.TODO()
// observer1 := &observer.NullObserver{
// Id: "Observer 1",
// IsSilent: true,
// }
// senzingEngineConfigurationJson, err := settings.BuildSimpleSettingsUsingEnvVars()
// testError(test, err)
// testObject := &InitializerImpl{
// SenzingEngineConfigurationJson: senzingEngineConfigurationJson,
// }
// testObject.SetLogLevel(ctx, logging.LevelInfoName)
// testObject.RegisterObserver(ctx, observer1)
// testObject.Initialize(ctx)
// testObject.UnregisterObserver(ctx, observer1)
// }
func TestBasicInitializer_UnregisterObserver(test *testing.T) {
ctx := context.TODO()
observer1 := &observer.NullObserver{
ID: "Observer 1",
IsSilent: true,
}
senzingSettings, err := settings.BuildSimpleSettingsUsingEnvVars()
require.NoError(test, err)
testObject := &BasicInitializer{
SenzingSettings: senzingSettings,
}
err = testObject.SetLogLevel(ctx, logging.LevelInfoName)
require.NoError(test, err)
err = testObject.RegisterObserver(ctx, observer1)
require.NoError(test, err)
err = testObject.Initialize(ctx)
require.NoError(test, err)
err = testObject.UnregisterObserver(ctx, observer1)
require.NoError(test, err)
}

// ----------------------------------------------------------------------------
// Helper functions
Expand Down
8 changes: 7 additions & 1 deletion makefiles/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ build-osarch-specific: darwin/amd64
.PHONY: clean-osarch-specific
clean-osarch-specific:
@docker rm --force $(DOCKER_CONTAINER_NAME) 2> /dev/null || true
@docker rmi --force $(DOCKER_IMAGE_NAME) $(DOCKER_BUILD_IMAGE_NAME) 2> /dev/null || true
@docker rmi --force $(DOCKER_IMAGE_NAME) $(DOCKER_BUILD_IMAGE_NAME) $(DOCKER_SUT_IMAGE_NAME) 2> /dev/null || true
@rm -f $(GOPATH)/bin/$(PROGRAM_NAME) || true
@rm -f $(MAKEFILE_DIRECTORY)/.coverage || true
@rm -f $(MAKEFILE_DIRECTORY)/coverage.html || true
Expand All @@ -43,6 +43,11 @@ coverage-osarch-specific:
@open file://$(MAKEFILE_DIRECTORY)/coverage.html


.PHONY: dependencies-for-development-osarch-specific
dependencies-for-development-osarch-specific:
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin latest


.PHONY: docker-build-osarch-specific
docker-build-osarch-specific:
@docker build \
Expand All @@ -53,6 +58,7 @@ docker-build-osarch-specific:

.PHONY: documentation-osarch-specific
documentation-osarch-specific:
@pkill godoc || true
@godoc &
@open http://localhost:6060

Expand Down
2 changes: 1 addition & 1 deletion makefiles/darwin_arm64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build-osarch-specific: darwin/arm64
.PHONY: docker-build-osarch-specific
docker-build-osarch-specific:
@docker build \
--platform linux/amd64 \
--platform linux/arm64 \
--tag $(DOCKER_IMAGE_NAME) \
--tag $(DOCKER_IMAGE_NAME):$(BUILD_VERSION) \
.
Expand Down
Loading

0 comments on commit e001e8f

Please sign in to comment.