diff --git a/test/cli/gateway_range_test.go b/test/cli/gateway_range_test.go index 5db7cc00e3e..7440e63411a 100644 --- a/test/cli/gateway_range_test.go +++ b/test/cli/gateway_range_test.go @@ -31,10 +31,10 @@ func TestGatewayHAMTDirectory(t *testing.T) { // Import fixtures r, err := os.Open("./fixtures/TestGatewayHAMTDirectory.car") - assert.Nil(t, err) + assert.NoError(t, err) defer r.Close() err = node.IPFSDagImport(r, fixtureCid) - assert.Nil(t, err) + assert.NoError(t, err) // Fetch HAMT directory succeeds with minimal refs resp := client.Get(fmt.Sprintf("/ipfs/%s/", hamtCid)) @@ -60,10 +60,10 @@ func TestGatewayMultiRange(t *testing.T) { // Import fixtures r, err := os.Open("./fixtures/TestGatewayMultiRange.car") - assert.Nil(t, err) + assert.NoError(t, err) defer r.Close() err = node.IPFSDagImport(r, fixtureCid) - assert.Nil(t, err) + assert.NoError(t, err) // Succeeds fetching a range of blocks we have resp := client.Get(fmt.Sprintf("/ipfs/%s", fileCid), func(r *http.Request) { diff --git a/test/cli/gateway_test.go b/test/cli/gateway_test.go index 67f7e136a24..972544ae001 100644 --- a/test/cli/gateway_test.go +++ b/test/cli/gateway_test.go @@ -28,7 +28,7 @@ func TestGateway(t *testing.T) { cid := node.IPFSAddStr("Hello Worlds!") peerID, err := peer.ToCid(node.PeerID()).StringOfBase(multibase.Base36) - assert.Nil(t, err) + assert.NoError(t, err) client := node.GatewayClient() client.TemplateData = map[string]string{ @@ -480,7 +480,7 @@ func TestGateway(t *testing.T) { }) node2PeerID, err := peer.ToCid(node2.PeerID()).StringOfBase(multibase.Base36) - assert.Nil(t, err) + assert.NoError(t, err) nodes.StartDaemons().Connect() diff --git a/test/cli/swarm_test.go b/test/cli/swarm_test.go index d3220810674..d1a4b5c6ca3 100644 --- a/test/cli/swarm_test.go +++ b/test/cli/swarm_test.go @@ -35,7 +35,7 @@ func TestSwarm(t *testing.T) { res := node.RunIPFS("swarm", "peers", "--enc=json", "--identify") var output expectedOutputType err := json.Unmarshal(res.Stdout.Bytes(), &output) - assert.Nil(t, err) + assert.NoError(t, err) assert.Equal(t, 0, len(output.Peers)) }) @@ -48,7 +48,7 @@ func TestSwarm(t *testing.T) { res := node.RunIPFS("swarm", "peers", "--enc=json", "--identify") var output expectedOutputType err := json.Unmarshal(res.Stdout.Bytes(), &output) - assert.Nil(t, err) + assert.NoError(t, err) actualID := output.Peers[0].Identify.ID actualPublicKey := output.Peers[0].Identify.PublicKey actualAgentVersion := output.Peers[0].Identify.AgentVersion @@ -78,12 +78,12 @@ func TestSwarm(t *testing.T) { otherNodeIDResponse := otherNode.RunIPFS("id", "--enc=json") var otherNodeIDOutput identifyType err := json.Unmarshal(otherNodeIDResponse.Stdout.Bytes(), &otherNodeIDOutput) - assert.Nil(t, err) + assert.NoError(t, err) res := node.RunIPFS("swarm", "peers", "--enc=json", "--identify") var output expectedOutputType err = json.Unmarshal(res.Stdout.Bytes(), &output) - assert.Nil(t, err) + assert.NoError(t, err) outputIdentify := output.Peers[0].Identify assert.Equal(t, outputIdentify.ID, otherNodeIDOutput.ID)