Unverified Commit 88abe33d authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #16 from ipfs/fix/base32-test

test: fix for base32 switch
parents e528b0cd 37a59b19
......@@ -10,7 +10,6 @@ env:
global:
- GOTFLAGS="-race"
matrix:
- BUILD_DEPTYPE=gx
- BUILD_DEPTYPE=gomod
......@@ -24,7 +23,6 @@ script:
cache:
directories:
- $GOPATH/src/gx
- $GOPATH/pkg/mod
- $HOME/.cache/go-build
......
......@@ -9,7 +9,7 @@ import (
func TestCidConv(t *testing.T) {
cidv0 := "QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn"
cidv1 := "zdj7WbTaiJT1fgatdet9Ei9iDB5hdCxkbVyhyh8YTUnXMiwYi"
cidv1 := "bafybeiczsscdsbs7ffqz55asqdf3smv6klcw3gofszvwlyarci47bgf354"
cid, err := c.Decode(cidv0)
if err != nil {
t.Fatal(err)
......@@ -19,7 +19,7 @@ func TestCidConv(t *testing.T) {
t.Fatal(err)
}
if cid.String() != cidv1 {
t.Fatal("conversion failure")
t.Fatalf("conversion failure: %s != %s", cid, cidv1)
}
cid, err = toCidV0(cid)
if err != nil {
......@@ -33,7 +33,7 @@ func TestCidConv(t *testing.T) {
func TestBadCidConv(t *testing.T) {
// this cid is a raw leaf and should not be able to convert to cidv0
cidv1 := "zb2rhhzX7uSKrtQ2ZZXFAabKiKFYZrJqKY2KE1cJ8yre2GSWZ"
cidv1 := "bafkreifit7vvfkf2cwwzvyycdczm5znbdbqx54ab6shbesvwgkwthdf77y"
cid, err := c.Decode(cidv1)
if err != nil {
t.Fatal(err)
......
{
"author": "kevina",
"bugs": {},
"gx": {
"dvcsimport": "github.com/ipfs/go-cidutil"
},
"gxDependencies": [
{
"author": "multiformats",
"hash": "QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW",
"name": "go-multihash",
"version": "1.0.9"
},
{
"author": "whyrusleeping",
"hash": "QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd",
"name": "go-multibase",
"version": "0.3.0"
},
{
"author": "whyrusleeping",
"hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN",
"name": "go-cid",
"version": "0.9.3"
}
],
"gxVersion": "0.12.1",
"language": "go",
"license": "",
"name": "go-cidutil",
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
"version": "0.2.1"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment