Skip to content

Commit

Permalink
fix fuzzy
Browse files Browse the repository at this point in the history
  • Loading branch information
aspacca committed Mar 15, 2020
1 parent 0411db0 commit 38d643e
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions server/server_fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,20 @@ func FuzzLocalStorage(fuzz []byte) int {
panic("unable to save file")
}

contentType, contentLength, err := storage.Head(token, filename)
contentLength, err := storage.Head(token, filename)
if err != nil {
panic("not visible through head")
}

if contentType != applicationOctetStream {
panic("incorrect content type")
}

if contentLength != fuzzLength {
panic("incorrect content length")
}

output, contentType, contentLength, err := storage.Get(token, filename)
output, contentLength, err := storage.Get(token, filename)
if err != nil {
panic("not visible through get")
}

if contentType != applicationOctetStream {
panic("incorrect content type")
}

if contentLength != fuzzLength {
panic("incorrect content length")
}
Expand Down Expand Up @@ -81,7 +73,7 @@ func FuzzLocalStorage(fuzz []byte) int {
panic("unable to delete file")
}

_, _, err = storage.Head(token, filename)
_, err = storage.Head(token, filename)
if !storage.IsNotExist(err) {
panic("file not deleted")
}
Expand Down

0 comments on commit 38d643e

Please sign in to comment.