9 var examplesHashForIPNS = "/ipfs/Qmbu7x6gJbsKDcseQv66pSbUcAA3Au6f7MfTYVXwvBxN2K"
10 var testKey = "self" // feel free to change to whatever key you have locally
12 func TestPublishDetailsWithKey(t *testing.T) {
14 shell := NewShell("localhost:5001")
16 resp, err := shell.PublishWithDetails(examplesHashForIPNS, testKey, time.Second, time.Second, false)
21 if resp.Value != examplesHashForIPNS {
22 t.Fatalf(fmt.Sprintf("Expected to receive %s but got %s", examplesHash, resp.Value))
26 func TestPublishDetailsWithoutKey(t *testing.T) {
28 shell := NewShell("localhost:5001")
30 resp, err := shell.PublishWithDetails(examplesHashForIPNS, "", time.Second, time.Second, false)
35 if resp.Value != examplesHashForIPNS {
36 t.Fatalf(fmt.Sprintf("Expected to receive %s but got %s", examplesHash, resp.Value))