sync file-type support across upload/convert and fix collected_at timezone handling

This commit is contained in:
2026-02-28 23:27:49 +03:00
parent 736b77f055
commit 4940cd9645
20 changed files with 931 additions and 49 deletions

View File

@@ -0,0 +1,17 @@
package server
import "testing"
func TestIsSupportedConvertFileName_AcceptsNvidiaBugReportGzip(t *testing.T) {
if !isSupportedConvertFileName("nvidia-bug-report-1651124000923.log.gz") {
t.Fatalf("expected .log.gz bug-report to be supported")
}
}
func TestAnalyzeUploadedFile_RejectsUnsupportedExtension(t *testing.T) {
s := &Server{}
_, _, _, err := s.analyzeUploadedFile("unsupported.bin", "application/octet-stream", []byte("abc"))
if err == nil {
t.Fatalf("expected unsupported archive error")
}
}