Skip to content

Commit

Permalink
Merge pull request #18 from TRON-US/fix-tests
Browse files Browse the repository at this point in the history
Fix tests due to unixfs get options
  • Loading branch information
steveyeom authored Dec 17, 2019
2 parents 68a18f4 + 0d34972 commit 3918430
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/unixfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ func (tp *TestSuite) TestAdd(t *testing.T) {
}
}

f, err := tapi.Unixfs().Get(ctx, p, false)
f, err := tapi.Unixfs().Get(ctx, p)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -595,7 +595,7 @@ func (tp *TestSuite) TestGetEmptyFile(t *testing.T) {

emptyFilePath := path.New(emptyFile)

r, err := api.Unixfs().Get(ctx, emptyFilePath, false)
r, err := api.Unixfs().Get(ctx, emptyFilePath)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -633,7 +633,7 @@ func (tp *TestSuite) TestGetDir(t *testing.T) {
t.Fatalf("expected path %s, got: %s", emptyDir.Cid(), p.String())
}

r, err := api.Unixfs().Get(ctx, path.IpfsPath(emptyDir.Cid()), false)
r, err := api.Unixfs().Get(ctx, path.IpfsPath(emptyDir.Cid()))
if err != nil {
t.Fatal(err)
}
Expand All @@ -657,7 +657,7 @@ func (tp *TestSuite) TestGetNonUnixfs(t *testing.T) {
t.Fatal(err)
}

_, err = api.Unixfs().Get(ctx, path.IpfsPath(nd.Cid()), false)
_, err = api.Unixfs().Get(ctx, path.IpfsPath(nd.Cid()))
if !strings.Contains(err.Error(), "proto: required field") {
t.Fatalf("expected protobuf error, got: %s", err)
}
Expand Down Expand Up @@ -741,7 +741,7 @@ func (tp *TestSuite) TestEntriesExpired(t *testing.T) {

ctx, cancel = context.WithCancel(ctx)

nd, err := api.Unixfs().Get(ctx, p, false)
nd, err := api.Unixfs().Get(ctx, p)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -907,7 +907,7 @@ func (tp *TestSuite) TestGetSeek(t *testing.T) {
t.Fatal(err)
}

r, err := api.Unixfs().Get(ctx, p, false)
r, err := api.Unixfs().Get(ctx, p)
if err != nil {
t.Fatal(err)
}
Expand All @@ -925,7 +925,7 @@ func (tp *TestSuite) TestGetSeek(t *testing.T) {

origR := bytes.NewReader(orig)

r, err = api.Unixfs().Get(ctx, p, false)
r, err = api.Unixfs().Get(ctx, p)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 3918430

Please sign in to comment.