mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-12-22 01:32:28 +01:00
Fix randomly failing test
This commit is contained in:
parent
91e6eaab19
commit
6ee3349cca
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ func TestSniffWriter_WriteUnknownMimeType(t *testing.T) {
|
|||
rr := httptest.NewRecorder()
|
||||
sw := NewContentTypeWriter(rr, "")
|
||||
randomBytes := make([]byte, 199)
|
||||
rand.Read(randomBytes)
|
||||
rand.Read(randomBytes[5:]) // Start at an offset; the test kept failing randomly because it hit random magic strings
|
||||
sw.Write(randomBytes)
|
||||
require.Equal(t, "application/octet-stream", rr.Header().Get("Content-Type"))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue