Skip to content

Commit

Permalink
#179 Improve test coverage (#180)
Browse files Browse the repository at this point in the history
* #179 Improve test coverage

* #179 Prepare for versioned release

* #179 Work on documentation

* #179 Rename Error types

* #179 Rename errors

* #179 Prepare for versioned release
  • Loading branch information
docktermj authored Sep 5, 2024
1 parent 22480a2 commit adc4f47
Show file tree
Hide file tree
Showing 17 changed files with 952 additions and 625 deletions.
4 changes: 2 additions & 2 deletions .github/coverage/testcoverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ local-prefix: "github.com/org/project"
threshold:
# (optional; default 0)
# The minimum coverage that each file should have
file: 70
file: 95

# (optional; default 0)
# The minimum coverage that each package should have
package: 80
package: 95

# (optional; default 0)
# The minimum total coverage project should have
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning].

-

## [0.14.1] - 2024-09-05

### Changed in 0.14.1

- Change from `SzConfigManager.GetConfigList` to `SzConfigManager.GetConfigs`
- Change from `buildOutDegree` to `buildOutDegrees`
- Change from `recordList` to `recordKeys`

## [0.14.0] - 2024-08-19

### Changed in 0.14.0
Expand Down
44 changes: 39 additions & 5 deletions bin/response-testcases.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"SzConfigAddDataSource": {
"tests": {
"test-000": {},
"test-001": {
"DSRC_ID": 1
}
}
},
"SzConfigExportConfig": {
"tests": {
"test-000": {},
"test-001": {
"G2_CONFIG": {
"CFG_ATTR": [
Expand Down Expand Up @@ -10282,6 +10284,7 @@
},
"SzConfigGetDataSources": {
"tests": {
"test-000": {},
"test-001": {
"DATA_SOURCES": [
{
Expand Down Expand Up @@ -10424,8 +10427,9 @@
}
}
},
"SzConfigManagerGetConfigList": {
"SzConfigManagerGetConfigs": {
"tests": {
"test-000": {},
"test-001": {
"CONFIGS": [
{
Expand All @@ -10444,6 +10448,7 @@
},
"SzConfigManagerGetConfig": {
"tests": {
"test-000": {},
"test-001": {
"G2_CONFIG": {
"CFG_ATTR": [
Expand Down Expand Up @@ -30357,6 +30362,7 @@
},
"SzDiagnosticCheckDatastorePerformance": {
"tests": {
"test-000": {},
"test-001": {
"insertTime": 1,
"numRecordsInserted": 1
Expand All @@ -30365,6 +30371,7 @@
},
"SzDiagnosticGetDatastoreInfo": {
"tests": {
"test-000": {},
"test-001": {
"dataStores": [
{
Expand All @@ -30378,6 +30385,7 @@
},
"SzDiagnosticGetFeature": {
"tests": {
"test-000": {},
"test-001": {
"LIB_FEAT_ID": 1,
"FTYPE_CODE": "NAME",
Expand Down Expand Up @@ -30412,6 +30420,7 @@
},
"SzEngineAddRecord": {
"tests": {
"test-000": {},
"test-001": {
"AFFECTED_ENTITIES": [],
"DATA_SOURCE": "blank",
Expand Down Expand Up @@ -30481,6 +30490,7 @@
},
"SzEngineDeleteRecord": {
"tests": {
"test-000": {},
"test-001": {
"AFFECTED_ENTITIES": [],
"DATA_SOURCE": "blank",
Expand Down Expand Up @@ -30532,7 +30542,7 @@
},
"SzEngineFetchNext": {
"tests": {
"test-001": {}
"test-000": {}
}
},
"SzEngineFindInterestingEntitiesByEntityID": {
Expand All @@ -30541,6 +30551,7 @@
"pythonClass": "SzEngineFindInterestingEntitiesByEntityID"
},
"tests": {
"test-000": {},
"test-001": {
"INTERESTING_ENTITIES": {
"ENTITIES": []
Expand All @@ -30554,6 +30565,7 @@
"pythonClass": "SzEngineFindInterestingEntitiesByRecordID"
},
"tests": {
"test-000": {},
"test-001": {
"INTERESTING_ENTITIES": {
"ENTITIES": []
Expand All @@ -30563,6 +30575,7 @@
},
"SzEngineFindNetworkByEntityID": {
"tests": {
"test-000": {},
"test-001": {
"ENTITIES": [
{
Expand Down Expand Up @@ -32558,6 +32571,7 @@
},
"SzEngineFindNetworkByRecordID": {
"tests": {
"test-000": {},
"test-001": {
"ENTITIES": [
{
Expand Down Expand Up @@ -33126,6 +33140,7 @@
},
"SzEngineFindPathByEntityID": {
"tests": {
"test-000": {},
"test-001": {
"ENTITIES": [
{
Expand Down Expand Up @@ -34410,6 +34425,7 @@
},
"SzEngineFindPathByRecordID": {
"tests": {
"test-000": {},
"test-001": {
"ENTITIES": [
{
Expand Down Expand Up @@ -35251,6 +35267,7 @@
},
"SzEngineGetEntityByEntityID": {
"tests": {
"test-000": {},
"test-001": {
"RELATED_ENTITIES": [],
"RESOLVED_ENTITY": {
Expand Down Expand Up @@ -37098,6 +37115,7 @@
},
"SzEngineGetEntityByRecordID": {
"tests": {
"test-000": {},
"test-001": {
"RELATED_ENTITIES": [],
"RESOLVED_ENTITY": {
Expand Down Expand Up @@ -37546,6 +37564,7 @@
},
"SzEngineGetRecord": {
"tests": {
"test-000": {},
"test-001": {
"ADDRESS_DATA": [],
"ATTRIBUTE_DATA": [],
Expand Down Expand Up @@ -37689,11 +37708,17 @@
},
"SzEngineGetRedoRecord": {
"tests": {
"test-001": {}
"test-000": {}
}
},
"SzEngineGetStats": {
"tests": {
"test-000": {}
}
},
"SzEngineGetVirtualEntityByRecordID": {
"tests": {
"test-000": {},
"test-001": {
"RESOLVED_ENTITY": {
"ENTITY_ID": 1,
Expand Down Expand Up @@ -41854,6 +41879,7 @@
},
"SzEngineHowEntityByEntityID": {
"tests": {
"test-000": {},
"test-001": {
"HOW_RESULTS": {
"FINAL_STATE": {
Expand Down Expand Up @@ -43883,6 +43909,7 @@
},
"SzEngineProcessRedoRecord": {
"tests": {
"test-000": {},
"test-001": {
"AFFECTED_ENTITIES": [],
"DATA_SOURCE": "blank",
Expand Down Expand Up @@ -43922,6 +43949,7 @@
},
"SzEngineReevaluateEntity": {
"tests": {
"test-000": {},
"test-001": {
"AFFECTED_ENTITIES": [
{
Expand Down Expand Up @@ -44574,6 +44602,7 @@
},
"SzEngineReevaluateRecord": {
"tests": {
"test-000": {},
"test-001": {
"AFFECTED_ENTITIES": [
{
Expand All @@ -44590,6 +44619,7 @@
},
"SzEngineSearchByAttributes": {
"tests": {
"test-000": {},
"test-001": {
"RESOLVED_ENTITIES": [],
"SEARCH_STATISTICS": [
Expand Down Expand Up @@ -46412,11 +46442,12 @@
"pythonClass": "SzEngineStreamExportJSONEntityReport"
},
"tests": {
"test-001": {}
"test-000": {}
}
},
"SzEngineWhyEntities": {
"tests": {
"test-000": {},
"test-001": {
"ENTITIES": [
{
Expand Down Expand Up @@ -48063,11 +48094,12 @@
},
"SzEngineWhyRecordInEntity": {
"tests": {
"test-001": {}
"test-000": {}
}
},
"SzEngineWhyRecords": {
"tests": {
"test-000": {},
"test-001": {
"ENTITIES": [],
"WHY_RESULTS": [
Expand Down Expand Up @@ -51959,6 +51991,7 @@
},
"SzProductGetLicense": {
"tests": {
"test-000": {},
"test-001": {
"billing": "blank",
"contract": "blank",
Expand All @@ -51973,6 +52006,7 @@
},
"SzProductGetVersion": {
"tests": {
"test-000": {},
"test-001": {
"BUILD_DATE": "blank",
"BUILD_NUMBER": "blank",
Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
The Senzing sz-sdk-go packages contain interface definitions for the Senzing Go SDK.
Module sz-sdk-go contains interface definitions for the Senzing Go SDK.
# Synopsis
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/aquilax/truncate v1.0.0
github.com/senzing-garage/sz-sdk-json-type-definition v0.2.6
github.com/senzing-garage/sz-sdk-json-type-definition v0.2.7
github.com/stretchr/testify v1.9.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
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/sz-sdk-json-type-definition v0.2.6 h1:306hNQumqaZ5Ge2aKdEMueKJ2KCSHh5WC5cs2EOdMRQ=
github.com/senzing-garage/sz-sdk-json-type-definition v0.2.6/go.mod h1:UlKL1vflvcE8rNOpbptlNiw57SixFAUWk5ftu5gHL9Y=
github.com/senzing-garage/sz-sdk-json-type-definition v0.2.7 h1:Sv0CMHPWaF8Jq+VBi56iDbBFeh/rfiGsiFOaAGZ2V4U=
github.com/senzing-garage/sz-sdk-json-type-definition v0.2.7/go.mod h1:UlKL1vflvcE8rNOpbptlNiw57SixFAUWk5ftu5gHL9Y=
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=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
4 changes: 2 additions & 2 deletions response/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ func SzConfigManagerGetConfig(ctx context.Context, jsonString string) (*typedef.
return result, err
}

func SzConfigManagerGetConfigList(ctx context.Context, jsonString string) (*typedef.SzConfigManagerGetConfigListResponse, error) {
func SzConfigManagerGetConfigs(ctx context.Context, jsonString string) (*typedef.SzConfigManagerGetConfigsResponse, error) {
_ = ctx
result := &typedef.SzConfigManagerGetConfigListResponse{}
result := &typedef.SzConfigManagerGetConfigsResponse{}
err := json.Unmarshal([]byte(jsonString), result)
return result, err
}
Expand Down
224 changes: 217 additions & 7 deletions response/response_test.go

Large diffs are not rendered by default.

Loading

0 comments on commit adc4f47

Please sign in to comment.