Files
logpile/internal/server/multipart_limits_test.go
Michael Chus 21ea129933 misc: sds format support, convert limits, dell dedup, supermicro removal, bible updates
Parser / archive:
- Add .sds extension as tar-format alias (archive.go)
- Add tests for multipart upload size limits (multipart_limits_test.go)
- Remove supermicro crashdump parser (ADL-015)

Dell parser:
- Remove GPU duplicates from PCIeDevices (DCIM_VideoView vs DCIM_PCIDeviceView
  both list the same GPU; VideoView record is authoritative)

Server:
- Add LOGPILE_CONVERT_MAX_MB env var for independent convert batch size limit
- Improve "file too large" error message with current limit value

Web:
- Add CONVERT_MAX_FILES_PER_BATCH = 1000 cap
- Minor UI copy and CSS fixes

Bible:
- bible-local/06-parsers.md: add pci.ids enrichment rule (enrich model from
  pciids when name is empty but vendor_id+device_id are present)
- Sync bible submodule and local overview/architecture docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 22:23:44 +03:00

30 lines
859 B
Go

package server
import "testing"
func TestConvertMultipartMaxBytes_Default(t *testing.T) {
t.Setenv("LOGPILE_CONVERT_MAX_MB", "")
got := convertMultipartMaxBytes()
want := int64(16384) << 20
if got != want {
t.Fatalf("convertMultipartMaxBytes()=%d, want %d", got, want)
}
}
func TestConvertMultipartMaxBytes_EnvClamp(t *testing.T) {
t.Setenv("LOGPILE_CONVERT_MAX_MB", "42")
if got := convertMultipartMaxBytes(); got != (int64(512) << 20) {
t.Fatalf("expected min clamp 512MB, got %d", got)
}
t.Setenv("LOGPILE_CONVERT_MAX_MB", "999999")
if got := convertMultipartMaxBytes(); got != (int64(65536) << 20) {
t.Fatalf("expected max clamp 65536MB, got %d", got)
}
t.Setenv("LOGPILE_CONVERT_MAX_MB", "12288")
if got := convertMultipartMaxBytes(); got != (int64(12288) << 20) {
t.Fatalf("expected exact env value 12288MB, got %d", got)
}
}