Move logpile to git.mchus.pro/reanimator/parser/v38 v38.0.0 (ADL-085). Add scripts/bump-parser.sh, which bumps the parser, tests, commits, tags the release as v<counter>.<parser major>, pushes and builds (ADL-086). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
885 B
Go
36 lines
885 B
Go
package server
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.mchus.pro/reanimator/parser/v38/models"
|
|
)
|
|
|
|
func TestBuildParserFieldSummary_MirrorsBoardInfoToTopLevel(t *testing.T) {
|
|
result := &models.AnalysisResult{
|
|
Hardware: &models.HardwareConfig{
|
|
BoardInfo: models.BoardInfo{
|
|
Manufacturer: "Supermicro",
|
|
ProductName: "SYS-821GE-TNHR",
|
|
SerialNumber: "A514359X5C08846",
|
|
PartNumber: "SYS-821GE-TNHR",
|
|
},
|
|
},
|
|
}
|
|
|
|
got := buildParserFieldSummary(result)
|
|
|
|
if got["vendor"] != "Supermicro" {
|
|
t.Fatalf("expected vendor mirror, got %v", got["vendor"])
|
|
}
|
|
if got["model"] != "SYS-821GE-TNHR" {
|
|
t.Fatalf("expected model mirror, got %v", got["model"])
|
|
}
|
|
if got["serial"] != "A514359X5C08846" {
|
|
t.Fatalf("expected serial mirror, got %v", got["serial"])
|
|
}
|
|
if got["part_number"] != "SYS-821GE-TNHR" {
|
|
t.Fatalf("expected part_number mirror, got %v", got["part_number"])
|
|
}
|
|
}
|