Skip to content

Commit

Permalink
Cleanup / base64content not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
rybnico committed May 28, 2019
1 parent aa21918 commit 0056206
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/upload/upload_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package upload

import (
"encoding/base64"
"io/ioutil"
"os"
"path/filepath"
Expand Down Expand Up @@ -249,10 +248,8 @@ func assertData(data map[string]string, t *testing.T, name string, contains []st
for _, k := range contains {
if v, ok := data[k]; ok {
content, _ := ioutil.ReadFile(filepath.Join("testdata", k))
base64content := make([]byte, base64.StdEncoding.EncodedLen(len(content)))
base64.StdEncoding.Encode(base64content, content)
if v != string(content) {
t.Errorf("%s case failed: content mismatch expected '%s' but got '%s(%s)' instead", name, content, base64content, v)
t.Errorf("%s case failed: content mismatch expected '%s' but got '%s' instead", name, content, v)
}
} else {
t.Errorf("%s case failed: expected data with key '%s' in '%s'", name, k, data)
Expand Down

0 comments on commit 0056206

Please sign in to comment.