Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor inconsistencies in XML rewrite #29

Merged
merged 6 commits into from
Feb 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove leftover TODOs related to testing
fabiante committed Feb 2, 2024
commit abf163f6058666eb0ed70c859c3a39e35cd8d680
10 changes: 5 additions & 5 deletions r_store_search.go
Original file line number Diff line number Diff line change
@@ -90,9 +90,9 @@ type SearchResponseChannel struct {
Title string `xml:"title"`
Link string `xml:"link"`
Description string `xml:"description"`
TotalResults int `xml:"totalResults"` // TODO: Assert in unmarshal test
ItemsPerPage int `xml:"itemsPerPage"` // TODO: Assert in unmarshal test
StartIndex int `xml:"startIndex"` // TODO: Assert in unmarshal test
TotalResults int `xml:"totalResults"`
ItemsPerPage int `xml:"itemsPerPage"`
StartIndex int `xml:"startIndex"`
Query struct {
Role string `xml:"role,attr"`
SearchTerms string `xml:"searchTerms,attr"`
@@ -114,10 +114,10 @@ type SearchResponseItem struct {
HistoryLink Link `xml:"historyLink"`
VerifyLink Link `xml:"verifyLink"`
DocumentType string `xml:"documentType"`
Fields []*RecordField `xml:"field"` // TODO: Assert and check in get attachment response if this is the correct way to handle recurring fields
Fields []*RecordField `xml:"field"`
MasterId uuid.UUID `xml:"masterId"`
ArchiveDateTime time.Time `xml:"archiveDateTime"`
ID uuid.UUID `xml:"id"`
Id uuid.UUID `xml:"id"`
Version string `xml:"version"`
ArchiverLogin string `xml:"archiverLogin"`
Archiver string `xml:"archiver"`
2 changes: 2 additions & 0 deletions r_store_search_test.go
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@ func TestStoreClient_Search(t *testing.T) {
// assert search result in general
assert.Equal(t, "Amazo*", response.Query.SearchTerms)
assert.Greater(t, response.TotalResults, 0)
assert.Greater(t, response.ItemsPerPage, 0)
assert.Greater(t, response.EffectiveResults, 0)

// assert single hit
@@ -55,6 +56,7 @@ func TestStoreClient_Search(t *testing.T) {
// assert search result in general
assert.Equal(t, "Amazo*", response.Query.SearchTerms)
assert.Greater(t, response.TotalResults, 0)
assert.Greater(t, response.ItemsPerPage, 0)
assert.Greater(t, response.EffectiveResults, 0)

// assert single hit