nerdctl
nerdctl copied to clipboard
testutil helpers are hard to use and make too many assumptions on command outcomes
Description
Specifically, some helpers testing stdout do first assert that exit code == 0.
However, there are legitimate cases where exit code is not 0 and you still want to test the output.
Recently, we also faced issues with commands being executed multiple times as each helper invocation used to call Run again.
In light of these issues, maybe it will soon be time to have a look at type Cmd
and possibly revamp it to make testing easier.
Steps to reproduce the issue
na
Describe the results you received and expected
na
What version of nerdctl are you using?
main
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
No response