(PDB-1300) Set conditional beaker options for AIO#1424
Conversation
|
Test PASSed. |
2236d3d to
ce3d1e3
Compare
|
Test FAILed. |
acceptance/options/embedded_db.rb
Outdated
There was a problem hiding this comment.
I'm sorry @johnduarte I've given you bad advice here. The options file stuff is parsed by beaker, not by us. In fact it's done in an order that means you can't fetch the options hash this way, you have to pluck the value from the environment instead - like ENV["BEAKER_TYPE"]. This sounds scarier than it sounds, the name of the variable is still a static API so its still not going to just underneath us (unless we do a major revision bump to beaker I guess, but it would break other stuff anyway since our CI jobs would need changing). Basically its a chicken and egg scenario, because this code loads the options hash, the options hash isn't yet available - or something like that, either way 'options' is out of scope in this module, the ENV variable is never out of scope however.
I'll fire up a job tomorrow with this change before you get online and we can see if it solves it.
There was a problem hiding this comment.
@kbarber the eval in the options parser did not seem to like typical conditional statements. I wound up using the tap method to influence the merge on an item-by-item basis. It looks a little weird, but it works. Let me know if you have a better recommendation.
FYI: We will need to update the jenkins job(s) to use the correct options when the puppetserver_embedded_db.rb is deleted
This commit adds conditional logic to the embedded_db.rb and postgres.rb beaker options files to include puppetserver options when the beaker `type` option is set to `aio`.
ce3d1e3 to
1c5859a
Compare
|
Test PASSed. |
This commit adds a beaker options file for puppetserver_postgres_db
in order to facilitate acceptance testing of PuppetDB with the
server provided by puppetserver and the database provided by
postgres.