Changes to cf-test-helpers


David Sabeti
 

Hi all,

tl;dr We've introduced a breaking change to cf-test-helpers (https://github.com/cloudfoundry-incubator/cf-test-helpers), so be careful if you decide to update to the newest version in your test suite.

The Release Integration team is making changes to cf-test-helpers, with a few different goals. One is to ensure that cf-test-helpers stop leaking credentials. Another is to push assertions from the test helpers up into the tests themselves. As a result, we've had to re-design a few parts of cf-test-helpers, specifically the `cmdRunner`. The class included a good deal of logic around running sub-processes (like the cf cli), including retries and making assertions on process output. In addition to occasionally leaking credentials, this logic was difficult to work with and should probably have been implemented in test cases rather than a helper package. So, we've removed the `cmdRunner` entirely. If your tests use `cmdRunner` (with the constructor `NewCmdRunner`), you'll need to modify your tests when you upgrade cf-test-helpers.

It's likely that this change will not affect anybody too seriously, since most people are using the package function `Run()` to shell out to sub-processes, and that interface has not changed at all. Still, some of you may be using the `cmdRunner` and deserve a head-up about the change.

If you'd like to update your dependency on cf-test-helpers, and you're using the `cmdRunner` in your tests, please feel free to reach out to the Release Integration team for help in migrating your test code.

David && Dennis
CF Release Integration

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.