chore(cli): add single CRUD-style test for tasks#20385
Conversation
DanielleMaywood
left a comment
There was a problem hiding this comment.
Approving although I think we lose test coverage here
I can keep the failure cases around if that helps? |
mafredri
left a comment
There was a problem hiding this comment.
Some suggestions and nits but integration test looks good otherwise.
I'm not so sure about deleting the existing tests for send/logs though as there are a lot of cases not tested in the integration.
I reverted the commits that delete them. We may wish to consolidate the |
6369650 to
ec9e273
Compare
ec9e273 to
562bbb4
Compare
| require.NoError(t, json.NewDecoder(strings.NewReader(stdout)).Decode(&task), "should unmarshal task status") | ||
| require.Equal(t, task.Name, taskName, "task name should match") | ||
| // NOTE: task status changes type, this is so this test works with both old and new model | ||
| require.Contains(t, []string{"active", "running"}, string(task.Status), "task should be active") |
There was a problem hiding this comment.
This should work both pre- and post-refactor.
Replaces duplicated tasks tests withAdds a single CRUD-style test for tasks CLI using a singlecoderdtestinstance.