Skip to content

Commit

Permalink
test lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ettec committed Nov 13, 2024
1 parent a29e85d commit 3f587c1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions core/capabilities/remote/executable/request/server_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func Test_ServerRequest_MessageValidation(t *testing.T) {
err := sendValidRequest(req, workflowPeers, capabilityPeerID, rawRequest)
require.NoError(t, err)
err = sendValidRequest(req, workflowPeers, capabilityPeerID, rawRequest)
assert.NotNil(t, err)
assert.Error(t, err)
})

t.Run("Send message with non calling don peer", func(t *testing.T) {
Expand All @@ -87,7 +87,7 @@ func Test_ServerRequest_MessageValidation(t *testing.T) {
Payload: rawRequest,
})

assert.NotNil(t, err)
assert.Error(t, err)
})

t.Run("Send message invalid payload", func(t *testing.T) {
Expand All @@ -108,8 +108,8 @@ func Test_ServerRequest_MessageValidation(t *testing.T) {
Method: types.MethodExecute,
Payload: append(rawRequest, []byte("asdf")...),
})
assert.NoError(t, err)
assert.Equal(t, 2, len(dispatcher.msgs))
require.NoError(t, err)
assert.Len(t, dispatcher.msgs, 2)
assert.Equal(t, types.Error_INTERNAL_ERROR, dispatcher.msgs[0].Error)
assert.Equal(t, types.Error_INTERNAL_ERROR, dispatcher.msgs[1].Error)
})
Expand All @@ -133,8 +133,8 @@ func Test_ServerRequest_MessageValidation(t *testing.T) {
Method: types.MethodExecute,
Payload: rawRequest,
})
assert.NoError(t, err)
assert.Equal(t, 2, len(dispatcher.msgs))
require.NoError(t, err)
assert.Len(t, dispatcher.msgs, 2)
assert.Equal(t, types.Error_INTERNAL_ERROR, dispatcher.msgs[0].Error)
assert.Equal(t, "failed to execute capability: an error", dispatcher.msgs[0].ErrorMsg)
assert.Equal(t, types.Error_INTERNAL_ERROR, dispatcher.msgs[1].Error)
Expand All @@ -160,8 +160,8 @@ func Test_ServerRequest_MessageValidation(t *testing.T) {
Method: types.MethodExecute,
Payload: rawRequest,
})
assert.NoError(t, err)
assert.Equal(t, 2, len(dispatcher.msgs))
require.NoError(t, err)
assert.Len(t, dispatcher.msgs, 2)
assert.Equal(t, types.Error_OK, dispatcher.msgs[0].Error)
assert.Equal(t, types.Error_OK, dispatcher.msgs[1].Error)
})
Expand Down Expand Up @@ -234,8 +234,8 @@ func Test_ServerRequest_MessageValidation(t *testing.T) {
Method: types.MethodUnregisterFromWorkflow,
Payload: rawRequest,
})
assert.NoError(t, err)
assert.Equal(t, 2, len(dispatcher.msgs))
require.NoError(t, err)
assert.Len(t, dispatcher.msgs, 2)
assert.Equal(t, types.Error_OK, dispatcher.msgs[0].Error)
assert.Equal(t, types.Error_OK, dispatcher.msgs[1].Error)
})
Expand Down

0 comments on commit 3f587c1

Please sign in to comment.