Closed brennx0r closed 8 years ago
@brennx0r This is a duplicate of #136. See there why this doesn't work and what are the possible solutions.
You didn't miss anything. This has to do with how bats processes test files and it's only briefly mentioned on the wiki. Which is unfortunate. This is a top item on my long list of proposed improvements that I've been planning to post once I find the time.
Just for reference, #157 is another duplicate that tried to do the same "is the package installed" use case.
Thanks for the info! Closing this issue out.
I am writing tests under test-kitchen that will verify that installations of packages have taken place. I was hoping to do this via providing the package names as an array and providing tests using a for loop:
Expected Result: This bats file run will result in the running of 12 tests. Observed Result: Only the last iteration through the array is captured out to console output (Look for all instance of the prefix "Jenkins Slave :: Dependencies ::"):
Any help that folks can provide on why this is happening would be appreciated, as I'm new to bats and may have missed a doc item that discusses nuances of loop use with tests. (I didn't see anything in the docs about this.)