Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
update the codec names for the dag put command (#248)
Browse files Browse the repository at this point in the history
* update test for renamed codecs in ipld-in-ipfs

* change defaults to reflect codec name changes
  • Loading branch information
willscott authored Aug 12, 2021
1 parent d8957a9 commit 7b4836e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions options/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type DagPutOption func(opts *DagPutSettings) error
// DagPutOptions applies the given options to a DagPutSettings instance.
func DagPutOptions(opts ...DagPutOption) (*DagPutSettings, error) {
options := &DagPutSettings{
InputEnc: "json",
Kind: "cbor",
InputEnc: "dag-json",
Kind: "dag-cbor",
Pin: "false",
Hash: "sha2-256",
}
Expand Down
2 changes: 1 addition & 1 deletion shell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func TestDagPut(t *testing.T) {
is := is.New(t)
s := NewShell(shellUrl)

c, err := s.DagPut(`{"x": "abc","y":"def"}`, "json", "cbor")
c, err := s.DagPut(`{"x": "abc","y":"def"}`, "dag-json", "dag-cbor")
is.Nil(err)
is.Equal(c, "bafyreidrm3r2k6vlxqp2fk47sboeycf7apddib47w7cyagrajtpaxxl2pi")
}
Expand Down

0 comments on commit 7b4836e

Please sign in to comment.