Skip to content

Commit

Permalink
resolve issues with error types from resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
acruikshank committed Mar 26, 2021
1 parent b906736 commit 3dfe47d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/corehttp/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func TestGatewayGet(t *testing.T) {
{"working.example.com", "/", http.StatusOK, "fnord"},
{"double.example.com", "/", http.StatusOK, "fnord"},
{"triple.example.com", "/", http.StatusOK, "fnord"},
{"working.example.com", k.String(), http.StatusNotFound, "ipfs resolve -r /ipns/working.example.com" + k.String() + ": no such field: {typeinfomissing}." + k.Cid().String() + "\n"},
{"working.example.com", k.String(), http.StatusNotFound, "ipfs resolve -r /ipns/working.example.com" + k.String() + ": no link named \"ipfs\" under " + k.Cid().String() + "\n"},
{"broken.example.com", "/", http.StatusNotFound, "ipfs resolve -r /ipns/broken.example.com/: " + namesys.ErrResolveFailed.Error() + "\n"},
{"broken.example.com", k.String(), http.StatusNotFound, "ipfs resolve -r /ipns/broken.example.com" + k.String() + ": " + namesys.ErrResolveFailed.Error() + "\n"},
// This test case ensures we don't treat the TLD as a file extension.
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ require (
github.com/ipfs/go-ds-flatfs v0.4.5
github.com/ipfs/go-ds-leveldb v0.4.2
github.com/ipfs/go-ds-measure v0.1.0
github.com/ipfs/go-fetcher v1.1.0
github.com/ipfs/go-filestore v0.0.3
github.com/ipfs/go-fs-lock v0.0.6
github.com/ipfs/go-graphsync v0.8.0
Expand All @@ -52,13 +51,14 @@ require (
github.com/ipfs/go-metrics-interface v0.0.1
github.com/ipfs/go-metrics-prometheus v0.0.2
github.com/ipfs/go-mfs v0.1.2
github.com/ipfs/go-path v0.0.10-0.20210325174225-7e4e7c9b6e0b
github.com/ipfs/go-path v0.0.10-0.20210326021800-49379d1308f1
github.com/ipfs/go-pinning-service-http-client v0.1.0
github.com/ipfs/go-unixfs v0.2.4
github.com/ipfs/go-verifcid v0.0.1
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210324205557-4ec7cff08e9e
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210326022702-98763dda3e52
github.com/ipld/go-car v0.2.1-0.20210312021557-7afab98d034f
github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db
github.com/jbenet/go-fuse-version v0.0.0-20160322195114-6d4c97bcf253 // indirect
github.com/jbenet/go-is-domain v1.0.5
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c
github.com/jbenet/go-temp-err-catcher v0.1.0
Expand Down
8 changes: 6 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,8 @@ github.com/ipfs/go-mfs v0.1.2/go.mod h1:T1QBiZPEpkPLzDqEJLNnbK55BVKVlNi2a+gVm4di
github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno=
github.com/ipfs/go-path v0.0.10-0.20210324191207-6a600cd3f256 h1:0Tyb3Na34eTu5GpHDFit6f4296U7qRoG/0j1/XQYHmY=
github.com/ipfs/go-path v0.0.10-0.20210324191207-6a600cd3f256/go.mod h1:QHYtDmpHe3xD5RQSkoco+BM7Vv0sg/tLHWv000t60sw=
github.com/ipfs/go-path v0.0.10-0.20210325174225-7e4e7c9b6e0b h1:19jAyzEhmuO5db4mcvYQSTxwfI77f9QWUBeEuQr0mxI=
github.com/ipfs/go-path v0.0.10-0.20210325174225-7e4e7c9b6e0b/go.mod h1:QHYtDmpHe3xD5RQSkoco+BM7Vv0sg/tLHWv000t60sw=
github.com/ipfs/go-path v0.0.10-0.20210326021800-49379d1308f1 h1:uu+WWErMYhHEX+GRpdACD+I8YpBo9MQcBX8DGZm0M7c=
github.com/ipfs/go-path v0.0.10-0.20210326021800-49379d1308f1/go.mod h1:QHYtDmpHe3xD5RQSkoco+BM7Vv0sg/tLHWv000t60sw=
github.com/ipfs/go-peertaskqueue v0.0.4/go.mod h1:03H8fhyeMfKNFWqzYEVyMbcPUeYrqP1MX6Kd+aN+rMQ=
github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U=
github.com/ipfs/go-peertaskqueue v0.1.1/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U=
Expand All @@ -500,6 +500,8 @@ github.com/ipfs/interface-go-ipfs-core v0.4.0 h1:+mUiamyHIwedqP8ZgbCIwpy40oX7QcX
github.com/ipfs/interface-go-ipfs-core v0.4.0/go.mod h1:UJBcU6iNennuI05amq3FQ7g0JHUkibHFAfhfUIy927o=
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210324205557-4ec7cff08e9e h1:8Mx4FzoMshYzz/9CtnmQLmLsQ9WQRGuPEeecwz2RvYs=
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210324205557-4ec7cff08e9e/go.mod h1:kSN12HNPXg8TrQfdyQOPbPIQVk5j8PcHTn2AAKCaZ6Q=
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210326022702-98763dda3e52 h1:NKvFg6nPuEhMMyoOUswEReIr3PWBNSgwNT6mDPLAcTo=
github.com/ipfs/interface-go-ipfs-core v0.4.1-0.20210326022702-98763dda3e52/go.mod h1:kSN12HNPXg8TrQfdyQOPbPIQVk5j8PcHTn2AAKCaZ6Q=
github.com/ipld/go-car v0.2.1-0.20210312021557-7afab98d034f h1:417+6v+keLsNoVi2vPJamDsW/ewuAs2uE3hlFt5muGs=
github.com/ipld/go-car v0.2.1-0.20210312021557-7afab98d034f/go.mod h1:kHunAcD305JwLqwI9MfKvuQu4ljwWRZQWfDWPrkkhcg=
github.com/ipld/go-codec-dagpb v1.0.2-0.20210308154810-d05d02fa186e h1:QXGG+qipDQaY7BT/n2gnDCS5Y6KNtdZNceTFHlPlEqE=
Expand All @@ -526,6 +528,8 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+
github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs=
github.com/jbenet/go-cienv v0.1.0 h1:Vc/s0QbQtoxX8MwwSLWWh+xNNZvM3Lw7NsTcHrvvhMc=
github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA=
github.com/jbenet/go-fuse-version v0.0.0-20160322195114-6d4c97bcf253 h1:+AUuGGAh/2X3wcomiZvjeTcx5OvGXsfdnIqk3KPM+HE=
github.com/jbenet/go-fuse-version v0.0.0-20160322195114-6d4c97bcf253/go.mod h1:gWtF+3u3zVe5/+I44niTEcU/KmVo2oMyLh0WhxpBT28=
github.com/jbenet/go-is-domain v1.0.5 h1:r92uiHbMEJo9Fkey5pMBtZAzjPQWic0ieo7Jw1jEuQQ=
github.com/jbenet/go-is-domain v1.0.5/go.mod h1:xbRLRb0S7FgzDBTJlguhDVwLYM/5yNtvktxj2Ttfy7Q=
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c h1:uUx61FiAa1GI6ZmVd2wf2vULeQZIKG66eybjNXKYCz4=
Expand Down

0 comments on commit 3dfe47d

Please sign in to comment.