aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/client/client_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-08-15 00:44:17 +0800
committerGitHub <noreply@github.com>2017-08-15 00:44:17 +0800
commit2403656373f1250e3668227bd9fc94e6e95412b9 (patch)
tree53ddfebc6a77ea7b8a3f7ac81c58baa8168f729e /swarm/api/client/client_test.go
parentef0edc6e32d98d2fca54076f38cb317f43704900 (diff)
parent133de3d80659680dc051065cb3baddd92a4e45c5 (diff)
downloadgo-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar.gz
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar.bz2
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar.lz
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar.xz
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.tar.zst
go-tangerine-2403656373f1250e3668227bd9fc94e6e95412b9.zip
Merge pull request #14951 from egonelbre/megacheck_swarm
swarm: fix megacheck warnings
Diffstat (limited to 'swarm/api/client/client_test.go')
-rw-r--r--swarm/api/client/client_test.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/swarm/api/client/client_test.go b/swarm/api/client/client_test.go
index 03d25049d..edf385dd0 100644
--- a/swarm/api/client/client_test.go
+++ b/swarm/api/client/client_test.go
@@ -89,8 +89,8 @@ func TestClientUploadDownloadFiles(t *testing.T) {
if file.Size != int64(len(expected)) {
t.Fatalf("expected downloaded file to be %d bytes, got %d", len(expected), file.Size)
}
- if file.ContentType != file.ContentType {
- t.Fatalf("expected downloaded file to have type %q, got %q", file.ContentType, file.ContentType)
+ if file.ContentType != "text/plain" {
+ t.Fatalf("expected downloaded file to have type %q, got %q", "text/plain", file.ContentType)
}
data, err := ioutil.ReadAll(file)
if err != nil {
@@ -235,9 +235,7 @@ func TestClientFileList(t *testing.T) {
t.Fatal(err)
}
paths := make([]string, 0, len(list.CommonPrefixes)+len(list.Entries))
- for _, prefix := range list.CommonPrefixes {
- paths = append(paths, prefix)
- }
+ paths = append(paths, list.CommonPrefixes...)
for _, entry := range list.Entries {
paths = append(paths, entry.Path)
}