-
Notifications
You must be signed in to change notification settings - Fork 83
fix: Converts WDL log exit_code from string to int32 per WES spec #380
Conversation
b23c939
to
0a4257e
Compare
4638966
to
0a4257e
Compare
5dbe853
to
0a4257e
Compare
s.Assert().Equal(testTaskJobId, tasks[0].JobId) | ||
s.Assert().True(tasks[0].StartTime.Equal(testStartTime.Truncate(time.Second))) | ||
s.Assert().True(tasks[0].StopTime.Equal(testStopTime.Truncate(time.Second))) | ||
s.Assert().Empty(nil, "NA") |
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 tests if nil
is "empty" which it always is. Perhaps you meant to test that ExitCode
is empty?
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.
awesome catch, thanks Mark! i've updated the test.
}, nil) | ||
|
||
tasks, err := s.manager.GetWorkflowTasks(testRunId) | ||
if s.Assert().NoError(err) { |
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.
Please remove the if statement as the if isn't needed but the assert is (same as the test below).
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.
completed.
@@ -200,6 +201,58 @@ func (s *GetWorkflowTasksTestSuite) TestGetWorkflowTasks_WithTaskNameFailure() { | |||
} | |||
} | |||
|
|||
func (s *GetWorkflowTasksTestSuite) TestGetWorkflowTasks_WithExitCodeUnknown() { |
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: Please update this to "TestGetWorkflowTasks_WithExitCodeNil"
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.
no prob.
a420299
to
aeac892
Compare
@markjschreiber Are you satisfied with the changes here? I want to do my revision of #317 based on top of this, since I'm going to need it for that feature to actually work, and there will be much less git surgery for me to do later if this is merged. |
Issue #, if available: #314
Description of Changes
Per the wes spec AGC was incorrectly requiring a string instead of an int. This fix includes updates/returns the
exit_code
's string to the requiredint32
or"NA"
for both successful/unsuccessful cases.Description of how you validated changes
I have added additional unit tests validating a successful and unsuccessful cases. Additionally, this was validated in the terminal.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
d