aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/manifest_test.go
diff options
context:
space:
mode:
authorholisticode <holistic.computing@gmail.com>2017-10-06 21:45:54 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-10-06 21:45:54 +0800
commit1ae0411d419d2178727048021f8dc09b6ccd1d82 (patch)
treee1958ecbcad5581d27c56afd5c03258309e19861 /swarm/api/manifest_test.go
parentd54e3539d453c78e30d950706f6465743723a33c (diff)
downloaddexon-1ae0411d419d2178727048021f8dc09b6ccd1d82.tar
dexon-1ae0411d419d2178727048021f8dc09b6ccd1d82.tar.gz
dexon-1ae0411d419d2178727048021f8dc09b6ccd1d82.tar.bz2
dexon-1ae0411d419d2178727048021f8dc09b6ccd1d82.tar.lz
dexon-1ae0411d419d2178727048021f8dc09b6ccd1d82.tar.xz
dexon-1ae0411d419d2178727048021f8dc09b6ccd1d82.tar.zst
dexon-1ae0411d419d2178727048021f8dc09b6ccd1d82.zip
swarm/api: fixed 404 handling on missing default entry (#15139)
Diffstat (limited to 'swarm/api/manifest_test.go')
-rw-r--r--swarm/api/manifest_test.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/swarm/api/manifest_test.go b/swarm/api/manifest_test.go
index 0208848a3..f048627c5 100644
--- a/swarm/api/manifest_test.go
+++ b/swarm/api/manifest_test.go
@@ -17,7 +17,6 @@
package api
import (
- // "encoding/json"
"bytes"
"encoding/json"
"fmt"
@@ -72,11 +71,21 @@ func TestGetEntry(t *testing.T) {
testGetEntry(t, "/a", "", "")
testGetEntry(t, "/a/b", "a/b", "a/b")
// longest/deepest math
- testGetEntry(t, "a/b", "-", "a", "a/ba", "a/b/c")
+ testGetEntry(t, "read", "read", "readme.md", "readit.md")
+ testGetEntry(t, "rf", "-", "readme.md", "readit.md")
+ testGetEntry(t, "readme", "readme", "readme.md")
+ testGetEntry(t, "readme", "-", "readit.md")
+ testGetEntry(t, "readme.md", "readme.md", "readme.md")
+ testGetEntry(t, "readme.md", "-", "readit.md")
+ testGetEntry(t, "readmeAmd", "-", "readit.md")
+ testGetEntry(t, "readme.mdffff", "-", "readme.md")
+ testGetEntry(t, "ab", "ab", "ab/cefg", "ab/cedh", "ab/kkkkkk")
+ testGetEntry(t, "ab/ce", "ab/ce", "ab/cefg", "ab/cedh", "ab/ceuuuuuuuuuu")
+ testGetEntry(t, "abc", "abc", "abcd", "abczzzzef", "abc/def", "abc/e/g")
+ testGetEntry(t, "a/b", "a/b", "a", "a/bc", "a/ba", "a/b/c")
testGetEntry(t, "a/b", "a/b", "a", "a/b", "a/bb", "a/b/c")
testGetEntry(t, "//a//b//", "a/b", "a", "a/b", "a/bb", "a/b/c")
}
-
func TestDeleteEntry(t *testing.T) {
}