mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2025-01-12 03:40:19 +01:00
fix fuzzy
This commit is contained in:
parent
0411db0443
commit
38d643e12b
1 changed files with 3 additions and 11 deletions
|
@ -32,28 +32,20 @@ func FuzzLocalStorage(fuzz []byte) int {
|
||||||
panic("unable to save file")
|
panic("unable to save file")
|
||||||
}
|
}
|
||||||
|
|
||||||
contentType, contentLength, err := storage.Head(token, filename)
|
contentLength, err := storage.Head(token, filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic("not visible through head")
|
panic("not visible through head")
|
||||||
}
|
}
|
||||||
|
|
||||||
if contentType != applicationOctetStream {
|
|
||||||
panic("incorrect content type")
|
|
||||||
}
|
|
||||||
|
|
||||||
if contentLength != fuzzLength {
|
if contentLength != fuzzLength {
|
||||||
panic("incorrect content length")
|
panic("incorrect content length")
|
||||||
}
|
}
|
||||||
|
|
||||||
output, contentType, contentLength, err := storage.Get(token, filename)
|
output, contentLength, err := storage.Get(token, filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic("not visible through get")
|
panic("not visible through get")
|
||||||
}
|
}
|
||||||
|
|
||||||
if contentType != applicationOctetStream {
|
|
||||||
panic("incorrect content type")
|
|
||||||
}
|
|
||||||
|
|
||||||
if contentLength != fuzzLength {
|
if contentLength != fuzzLength {
|
||||||
panic("incorrect content length")
|
panic("incorrect content length")
|
||||||
}
|
}
|
||||||
|
@ -81,7 +73,7 @@ func FuzzLocalStorage(fuzz []byte) int {
|
||||||
panic("unable to delete file")
|
panic("unable to delete file")
|
||||||
}
|
}
|
||||||
|
|
||||||
_, _, err = storage.Head(token, filename)
|
_, err = storage.Head(token, filename)
|
||||||
if !storage.IsNotExist(err) {
|
if !storage.IsNotExist(err) {
|
||||||
panic("file not deleted")
|
panic("file not deleted")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue