-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Nexus links tests #1613
base: master
Are you sure you want to change the base?
Add Nexus links tests #1613
Conversation
require.Equal(t, tc.testConfig.Namespace, link.GetWorkflowEvent().GetNamespace()) | ||
require.Equal(t, handlerWfID, link.GetWorkflowEvent().GetWorkflowId()) | ||
require.NotEmpty(t, link.GetWorkflowEvent().GetRunId()) | ||
requireProtoEqual( | ||
t, | ||
&common.Link_WorkflowEvent_EventReference{ | ||
EventType: enums.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED, | ||
}, | ||
link.GetWorkflowEvent().GetEventRef()) | ||
handlerRunID := link.GetWorkflowEvent().GetRunId() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you could have just used requireProtoEqual
on the entire struct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot because I don't have the handler run id.
@@ -290,10 +298,22 @@ func TestNexusWorkflowRunOperation(t *testing.T) { | |||
|
|||
nc := tc.newNexusClient(t, service.Name) | |||
|
|||
link := &common.Link_WorkflowEvent{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant IMHO since we're already testing adding links from a workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this in the last PR but please mark these functions as experimental in a different PR since this one has to remain a draft until we have a CLI with server 1.26.
https://github.com/temporalio/sdk-go/blob/master/temporalnexus/link_converter.go#L65-L89
What was changed
Add Nexus links tests
Why?
Checklist
Closes
How was this tested: