I am having issues with the following spec test :
74 before do
75 allow_any_instance_of(Chef::Recipe).to receive(:include_recipe).and_call_original
76 allow(File).to receive(:exist?).and_call_original
77 allow(File).to receive(:exist?).with('/etc/.firstboot_done').and_return(false)
78 end
79
80 cached(:chef_run) do
81 ChefSpec::ServerRunner.new(platform: 'aws', version: 'xxx') do |node|
82 node.normal[:xxx][:xxx] = 'xxx'
83 node.normal[:xxx] = 'xxx'
84 node.normal[:xxx] = 'xxx'
85 node.normal[:opc_hostmetrics][:package] = 'opc-hostmetrics'
86 node.normal[:xxx][:version] = xxx
87 node.normal[:xxx][:release] = xxx
88 node.normal[:packages] = {}
89 end.converge(described_recipe)
90 end
91
92 it 'installs opc-hostmetrics when no version is installed' do
93 expect(chef_run).to install_package('opc-hostmetrics').with(version: '2.0-2')
94 binding.pry
95 end
96 end```