Rename backend code references: Bookmann → Bookhoard
Backend changes: - Update import paths: bookmann/internal → bookhoard/internal - Rename struct fields: BookmannUUID → BookhoardUUID - Update handler function names: mapContentIdToBookmannUUID → mapContentIdToBookhoardUUID - Update HTTP response headers: X-Bookmann-* → X-Bookhoard-* - Update service and middleware references - Update main.go imports and references This is part 2 of the project rename to Bookhoard.
This commit is contained in:
@@ -120,7 +120,7 @@ func TestEntrySetIdentifier(t *testing.T) {
|
||||
t.Fatal("expected Identifier to be set, but it was nil")
|
||||
}
|
||||
|
||||
if entry.Identifier.ID != "bookmann" {
|
||||
if entry.Identifier.ID != "bookhoard" {
|
||||
t.Errorf("expected Identifier ID to be 'bookmann', got '%s'", entry.Identifier.ID)
|
||||
}
|
||||
|
||||
@@ -131,14 +131,14 @@ func TestEntrySetIdentifier(t *testing.T) {
|
||||
|
||||
func TestEntryAddMetadata(t *testing.T) {
|
||||
entry := NewEntry("urn:uuid:test-id", "Test Title", "Test Author", "2023-01-01T00:00:00Z")
|
||||
entry.AddMetadata("bookmann:sha256", "abc123...")
|
||||
entry.AddMetadata("bookhoard:sha256", "abc123...")
|
||||
|
||||
if len(entry.Metadata) != 1 {
|
||||
t.Fatalf("expected 1 metadata item, got %d", len(entry.Metadata))
|
||||
}
|
||||
|
||||
meta := entry.Metadata[0]
|
||||
if meta.Property != "bookmann:sha256" {
|
||||
if meta.Property != "bookhoard:sha256" {
|
||||
t.Errorf("expected Property to be 'bookmann:sha256', got '%s'", meta.Property)
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ func TestFeedGenerateXML(t *testing.T) {
|
||||
entry := NewEntry("urn:uuid:book-id", "Test Book", "Test Author", "2023-01-01T00:00:00Z")
|
||||
entry.AddAcquisitionLink("http://example.com/book.epub", "application/epub+zip")
|
||||
entry.SetIdentifier("book-uuid-123")
|
||||
entry.AddMetadata("bookmann:sha256", "abc123...")
|
||||
entry.AddMetadata("bookhoard:sha256", "abc123...")
|
||||
feed.AddEntry(entry)
|
||||
|
||||
output, err := feed.GenerateXML()
|
||||
@@ -205,8 +205,8 @@ func TestFeedGenerateXML(t *testing.T) {
|
||||
`<dc:creator>Test Author</dc:creator>`,
|
||||
`<link href="http://example.com/book.epub"`,
|
||||
`rel="http://opds-spec.org/acquisition/open-access"`,
|
||||
`<dc:identifier id="bookmann">book-uuid-123</dc:identifier>`,
|
||||
`<meta property="bookmann:sha256">abc123...</meta>`,
|
||||
`<dc:identifier id="bookhoard">book-uuid-123</dc:identifier>`,
|
||||
`<meta property="bookhoard:sha256">abc123...</meta>`,
|
||||
}
|
||||
|
||||
for _, required := range requiredStrings {
|
||||
|
||||
Reference in New Issue
Block a user