Closed jf647 closed 9 years ago
Even with this I can't make it work... get errors like
10) db-server::user
Failure/Error: cached(:chef_run) { converge }
Double "vault item db_users/casinosaga" received :[] with unexpected arguments
expected: ("password")
got: ("id")
Please stub a default value first if message might be received with other args as well.
Can you share the recipe that is driving this? We don't stub the 'id' key of the vault item, and I've not run into a recipe that needed it before. It's a simple enough stub to add, but I'd like to understand the use case better before blindly adding it.
I use it all over the place. Why would you skip the id? Doesn't make sense. Just stub everything in the json. I can't think of a single reason why not
On second glance it looks like a little something was missing. I added the following to my stubs:
allow(ChefVault::Item).to receive(:load).and_call_original
That seems to do the trick for me.
This fixes issue #11 and ensures that you can still stub an unencrypted data bag.