mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 11:18:24 +00:00
fix: pin kind 11998 in the indexable-content golden and make it CRLF-proof
The golden test's KINDS list was missing the new heartbeat kind, and the comparison read the golden raw — on Windows CI (autocrlf checkout) every internal CRLF counted as a diff, failing the suite with a full-table ComparisonFailure. Adds 11998 as a pinned <not searchable> row (a heartbeat is a machine signal: no indexable content, per the NIP-50 eligibility policy), normalizes CRLF in the comparison, and forces LF for *.golden in .gitattributes so checkouts can never break it. No reindex needed: nothing is indexed for this kind.
This commit is contained in:
@@ -2,3 +2,7 @@
|
|||||||
# binary so git never applies CRLF/text normalization or textual diff/merge, which
|
# binary so git never applies CRLF/text normalization or textual diff/merge, which
|
||||||
# would corrupt the compressed stream (important on Windows checkouts).
|
# would corrupt the compressed stream (important on Windows checkouts).
|
||||||
*.gz binary
|
*.gz binary
|
||||||
|
|
||||||
|
# Golden test resources are compared byte-for-byte against generated strings:
|
||||||
|
# force LF everywhere so a Windows CRLF checkout cannot break the comparison.
|
||||||
|
*.golden text eol=lf
|
||||||
|
|||||||
+4
-1
@@ -107,7 +107,9 @@ class IndexableContentGoldenTest {
|
|||||||
"a kind's indexed text changed. If deliberate: rerun with -Dgolden=write, update " +
|
"a kind's indexed text changed. If deliberate: rerun with -Dgolden=write, update " +
|
||||||
"references/searchable-kinds.md in the same commit, and schedule a reindex " +
|
"references/searchable-kinds.md in the same commit, and schedule a reindex " +
|
||||||
"(IEventStore.reindexFullTextSearch) — existing databases keep their old text.",
|
"(IEventStore.reindexFullTextSearch) — existing databases keep their old text.",
|
||||||
golden.readText().trim(),
|
// Normalize CRLF: Windows checkouts (autocrlf) would otherwise fail this comparison
|
||||||
|
// on invisible line endings alone.
|
||||||
|
golden.readText().replace("\r\n", "\n").trim(),
|
||||||
actual.trim(),
|
actual.trim(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -211,6 +213,7 @@ class IndexableContentGoldenTest {
|
|||||||
10100,
|
10100,
|
||||||
10154,
|
10154,
|
||||||
11871,
|
11871,
|
||||||
|
11998,
|
||||||
12473,
|
12473,
|
||||||
15128,
|
15128,
|
||||||
15129,
|
15129,
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
10100
|
10100
|
||||||
10154 The Title\nThe Description
|
10154 The Title\nThe Description
|
||||||
11871 The content body.
|
11871 The content body.
|
||||||
|
11998 <not searchable>
|
||||||
12473 The Alt
|
12473 The Alt
|
||||||
15128 The Title\nThe Description
|
15128 The Title\nThe Description
|
||||||
15129 The Title\nThe Description
|
15129 The Title\nThe Description
|
||||||
|
|||||||
Reference in New Issue
Block a user