aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/client
diff options
context:
space:
mode:
authorEgon Elbre <egonelbre@gmail.com>2017-08-09 01:34:35 +0800
committerEgon Elbre <egonelbre@gmail.com>2017-08-14 23:12:37 +0800
commit133de3d80659680dc051065cb3baddd92a4e45c5 (patch)
treecc67ede99634e335f8a07a5b0b084877cb8282d7 /swarm/api/client
parent6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f (diff)
downloaddexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.gz
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.bz2
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.lz
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.xz
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.zst
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.zip
swarm: fix megacheck warnings
Diffstat (limited to 'swarm/api/client')
-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)
}