aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/http/server_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/api/http/server_test.go')
-rw-r--r--swarm/api/http/server_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/swarm/api/http/server_test.go b/swarm/api/http/server_test.go
index 2acdbd1ad..4a3ca0429 100644
--- a/swarm/api/http/server_test.go
+++ b/swarm/api/http/server_test.go
@@ -501,7 +501,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
var respbody []byte
url := srv.URL + "/bzz-raw:/"
- if k[:] != "" {
+ if k != "" {
url += rootRef + "/" + k[1:] + "?content_type=text/plain"
}
resp, err = http.Get(url)
@@ -515,7 +515,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
isexpectedfailrequest := false
for _, r := range expectedfailrequests {
- if k[:] == r {
+ if k == r {
isexpectedfailrequest = true
}
}
@@ -530,7 +530,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
var respbody []byte
url := srv.URL + "/bzz-hash:/"
- if k[:] != "" {
+ if k != "" {
url += rootRef + "/" + k[1:]
}
resp, err = http.Get(url)
@@ -547,7 +547,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
isexpectedfailrequest := false
for _, r := range expectedfailrequests {
- if k[:] == r {
+ if k == r {
isexpectedfailrequest = true
}
}
@@ -599,7 +599,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
} {
k := c.path
url := srv.URL + "/bzz-list:/"
- if k[:] != "" {
+ if k != "" {
url += rootRef + "/" + k[1:]
}
t.Run("json list "+c.path, func(t *testing.T) {
@@ -618,7 +618,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
isexpectedfailrequest := false
for _, r := range expectedfailrequests {
- if k[:] == r {
+ if k == r {
isexpectedfailrequest = true
}
}
@@ -650,7 +650,7 @@ func testBzzGetPath(encrypted bool, t *testing.T) {
isexpectedfailrequest := false
for _, r := range expectedfailrequests {
- if k[:] == r {
+ if k == r {
isexpectedfailrequest = true
}
}