After some chef zero runs (which save the node state as local .json files) I was dismayed to find this in the node files:
...
"ssmtp": {
"auth_username": "secret user name",
"auth_password": "even-more-secret password"
}
The same runs on Chef Server would save the node data on the server. That's is a problem of course, and I'll have to replace credentials, modify the recipes, etc. I am still investigating what caused this in the first place but my question is:
How I can create an rspec/chefspec test for a recipe to verify that a particular node attribute is NOT saved persistently in the node's .json file or on Chef Server?
I'd like to add this to my specs to make sure it never happens again.
Epilogue
The big lesson here is that anything finding its way into any node attribute winds up being saved in the node object representation.