Skip to content

Conversation

@chicoxyzzy
Copy link
Contributor

This PR adds initial integration tests for the dispatch run command

@chicoxyzzy chicoxyzzy added the tests test coverage label May 29, 2024
@chicoxyzzy chicoxyzzy self-assigned this May 29, 2024
@chicoxyzzy chicoxyzzy force-pushed the dispatch_run_tests branch 2 times, most recently from d715f8a to 4d90bc8 Compare May 29, 2024 17:29
@chicoxyzzy chicoxyzzy force-pushed the dispatch_run_tests branch from 4d90bc8 to 757e095 Compare May 29, 2024 17:37
Comment on lines +147 to +148
// Check if the error is due to context timeout (command running too long)
if ctx.Err() == context.DeadlineExceeded {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The context error will always carry information about this being a timeout, could we simplify the code by removing this special case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will do exit 1 on printenv ENV_VARIABLE, so I've added this check to be sure that this command exited properly and we can read stderr now to make sure ENV_VARIABLE has correct value (when err is nil).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I'm not sure I understand the condition in which we would get a timeout, but if you know it's important here it's fine (maybe worth a comment to record that context).

@chicoxyzzy chicoxyzzy merged commit bee7c39 into main May 31, 2024
@chicoxyzzy chicoxyzzy deleted the dispatch_run_tests branch May 31, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants