[SERVER-709] Make test helpers reusable by other projects Created: 2015/06/03  Updated: 2016/12/09  Resolved: 2016/12/09

Status: Closed
Project: Puppet Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: Kevin Corcoran Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: low-hanging-fruit, server
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
Template:
QA Contact: Erik Dasher

 Description   

Puppet Server has a number of test helper functions which would be useful in other projects - namely, pe-puppet-server-extensions. These should be exposed in way that they can be consumed by other projects.

The preferred solution here is to simply build a test .jar, the way our other Clojure projects do (e.g. Trapperkeeper). This is slightly more complicated in this case, since Puppet Server uses voom to do intermediate/internal releases - but Chris Price says that it should work just fine.



 Comments   
Comment by Chris Price [ 2015/06/04 ]

Note that these test helper functions may serve as the beginnings of a mini-DSL for writing Puppet tests in Clojure, where we historically would have needed to use Beaker. These tests are much more efficient, so it is highly desirable to get some traction on standardizing patterns for them.

Code in question is stuff like this:

https://github.com/puppetlabs/puppet-server/blob/ce9c91cc3d6b28003ab5c40c4828454ae9fdf398/test/integration/puppetlabs/services/jruby/puppet_environments_int_test.clj#L31-L126

Comment by Kevin Corcoran [ 2015/07/24 ]

I'm running into this again ... needing to use more of these in PE. (i.e. reduce-over-jrubies)

Comment by Justin Stoller [ 2016/02/29 ]

Code called out in this ticket was done in: https://github.com/puppetlabs/puppet-server/pull/871

Looking to see if anything else right now needs doing...

Comment by Chris Price [ 2016/03/01 ]

Justin Stoller has pe-pse been refactored to use those testutils? I was thinking that it still had a duplicate copy of a lot of those functions.

Comment by Justin Stoller [ 2016/03/01 ]

No, ppse hasn't been refactored to use those fns yet. I think Kevin Corcoran wanted me to tackle that in PE-11634.

Comment by Chris Price [ 2016/03/01 ]

Ah, OK, didn't see that there was a separate ticket for that. Carry on, then

Generated at Sat Dec 14 17:02:22 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.