-1
我想寫一個chefspec用於創建jenkins用戶的代碼,如下所示。我如何使用chefspec包含非廚師資源
jenkins_user 'test1' do
full_name 'test user'
email '[email protected]'
password 'testp'
end
這裏「jenkins_user」不是廚師資源。我如何編寫chefspec來對配方進行單元測試。
或者如果我們有其他方法來運行配方的單元測試,請讓我知道。
您可以閱讀關於[使用ChefSpec測試LWRP]的文檔(https://github.com/sethvargo/chefspec#testing-lwrps) – Tensibai