Hey, I could use some advice here. We've had a puppet module out for a 
while (https://github.com/Nextdoor/puppet_thycotic) that provides us a way 
to retrieve private keys, passwords, etc from Thycotic's 
SecretServerOnline.com service. This module was written in a hurry almost 2 
years ago and has never had any real attention paid to it internally until 
now.

We're re-writing it now to use the proper SOAP APIs provided by the 
Thycotic team, and I'm trying to clean it up so its more usable by other 
folks. That includes full unit testing (I hope) to really exercise the 
code. The problem is that I'm much more of a Python programmer than Ruby, 
so I'm a little lost right now.

The code I've written is up for review 
here: https://review.opensource.nextdoor.com/#/c/32/

I welcome any comments overall -- Ruby is clearly not my language of choice 
so I may have done some silly things in there.

Where I'd really like some help is figuring out how to mock the SOAP Driver 
object. From an Rspec test, how can I reach through the 'getsecret()' 
function, into the 'Thycotic' object that it creates, to mock the '@driver' 
object? In Python this is relatively simple, but Ruby seems to protect the 
objects more so I'm not really sure how to do this.

Part of me was thinking there might be some hacky way I can clone the WSDL 
definition file and tune it so that the SOAP driver always responds with 
some hard-coded data when a method is called... but that may also be crazy.

Thoughts?

--Matt

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to