I'm working on an update to the enhanced-old-build-discarder plugin that allows for some greater configuration specificity in the discard logic. The plugin functions as expected in my local Jenkins instance, but I'm having trouble with the unit testing.
The relevant pull request is here: https://github.com/jenkinsci/enhanced-old-build-discarder/pull/2. The relevant test file is here: https://github.com/jenkinsci/enhanced-old-build-discarder/blob/47b97f9bf76f644bde91b4fda71f99572cbeda22/src/test/java/org/jenkinsci/plugins/enhancedoldbuilddiscarder/EnhancedOldBuildDiscarderTest.java . I must be doing something incorrectly with my mock Job data. I generate a build history suitable for my usage cases and use Mockito "when" to have this represent the build history of the mock Job. An instance of the plugin class is instantiated and this Job is passed to it as an argument. I'm then trying to verify that delete commands are either logged or not logged for the build histories as is appropriate to the usage case. No matter the circumstance builds are never verified to be deleted. Does anyone have an idea what the issue is here? I expect it won't take much to fix but I'm puzzled by it. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/1a92e9c4-f6b0-487f-a866-56a01b0aacb8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
