sync file-type support across upload/convert and fix collected_at timezone handling
This commit is contained in:
17
internal/server/file_support_test.go
Normal file
17
internal/server/file_support_test.go
Normal 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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user