EXPECTED TO FAIL: tests are not correctly checking package_version #279
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It appears that for some reason, the value being provided to the class under test for the package_version parameter does not in fact get set to each of the values in the test array. Instead, the last value listed is passed to the class under test repeatedly, the number of times that there are elements in the array of strings that are expected to be valid package versions.
This can be demonstrated several ways; besides my expectation on the parameter value that the puppet-agent class receives, you could also add values like
1.3.5banana
(from the array of versions expected to be invalid) to the array of versions expected to be valid, in any position but the last one, and see that the tests do not fail as they should.I've spent several hours fidgeting and trying to determine why this is the case, but I am unfamiliar with ruby and the underlying issue probably requires a deep knowledge of ruby and/or this testing framework. I need to move on, but wanted to bring to the maintainers' attention that the test suite is not actually checking all the inputs it appears to be checking.