mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
swarm/api: match tests to rebase changes caused by nameresolver to uri.Immutable() migration
This commit is contained in:
parent
d7c5047164
commit
1faa2b1ebd
2 changed files with 7 additions and 7 deletions
|
|
@ -85,7 +85,7 @@ func (self *Api) Resolve(uri *URI) (storage.Key, error) {
|
||||||
log.Trace(fmt.Sprintf("Resolving : %v", uri.Addr))
|
log.Trace(fmt.Sprintf("Resolving : %v", uri.Addr))
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
if uri.Immutable() {
|
if !uri.Immutable() {
|
||||||
if self.dns != nil {
|
if self.dns != nil {
|
||||||
resolved, err := self.dns.Resolve(uri.Addr)
|
resolved, err := self.dns.Resolve(uri.Addr)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
|
||||||
|
|
@ -100,15 +100,15 @@ func TestBzzrGetPath(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
nonhashtests := []string{
|
nonhashtests := []string{
|
||||||
"http://127.0.0.1:8504/bzz:/name",
|
srv.URL + "/bzz:/name",
|
||||||
"http://127.0.0.1:8504/bzzi:/nonhash",
|
srv.URL + "/bzzi:/nonhash",
|
||||||
"http://127.0.0.1:8504/bzzr:/nonhash",
|
srv.URL + "/bzzr:/nonhash",
|
||||||
}
|
}
|
||||||
|
|
||||||
nonhashresponses := []string{
|
nonhashresponses := []string{
|
||||||
"can't resolve: 'name' does not resolve: no DNS to resolve name but is not a content hash\n",
|
"error resolving name: 'name' does not resolve: no DNS to resolve name but is not a content hash\n",
|
||||||
"can't resolve: '%!s(MISSING)' is not a content hash\n",
|
"error resolving nonhash: 'nonhash' is not a content hash\n",
|
||||||
"'nonhash' does not resolve: no DNS to resolve name but is not a content hash\n",
|
"error resolving nonhash: 'nonhash' does not resolve: no DNS to resolve name but is not a content hash\n",
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, url := range nonhashtests {
|
for i, url := range nonhashtests {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue