You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to ask for some help to understand why I see tons of logs like this in rspec results even though tests pass well:
No matching version found for 'aws-sdk-ssm' in your gem environment.
- if you are using ChefDK, run the following command: "chef gem install aws-sdk-ssm --version '~> 1.46.0'"
- if you are using bundler, append "gem 'aws-sdk-ssm', '~> 1.46.0'" to your Gemfile and run "bundle install"
- otherwise run: "gem install aws-sdk-ssm --version '~> 1.46.0'"
Trying to get rid of the log messages I used different versions of ChefDK from 3.0 to 4.9.17. Also, I tested every possible combination of commands trying to reduce the noise in logs, including:
updating all 'metadata.rb' files adding gem 'XXXX', '~> X.X.X';
running chef exec bundle config set system true or bundle config set system true before installing gems;
running chef exec bundle install;
running bundle install;
running chef gem install xxx -v '~> X.X.X' for every dependency before running rspec
In addition, I checked $PATH to make sure Ruby is configured properly. And I used bundle info xxx (or chef exec bundle info xxx) to make sure the Gem is installed.
Nothing helped to remove the errors.
What am I doing wrong and how to remove the message?
Test example:
require 'spec_helper'
describe 'cloudwatch_logs::default' do
cached(:chef_run) do
ChefSpec::SoloRunner.new do |node|
node.default['languages'] = { 'python' => { 'version' => '2.7.1' } }
end.converge(described_recipe)
end
it 'includes the `aws-cloudwatchlogs` recipe' do
expect(chef_run).to include_recipe('aws-cloudwatchlogs')
end
end
The cookbook has depends 'aws', '= 8.4.1' in metadata.rb.
I'm not an expert in Chef cookbooks, especially in testing. So I admit the possibility that I need to write tests somehow differently to make it work properly.
Appreciate any help.
The text was updated successfully, but these errors were encountered:
Hi.
I would like to ask for some help to understand why I see tons of logs like this in rspec results even though tests pass well:
Trying to get rid of the log messages I used different versions of ChefDK from 3.0 to 4.9.17. Also, I tested every possible combination of commands trying to reduce the noise in logs, including:
gem 'XXXX', '~> X.X.X'
;chef exec bundle config set system true
orbundle config set system true
before installing gems;chef exec bundle install
;bundle install
;chef gem install xxx -v '~> X.X.X'
for every dependency before running rspecIn addition, I checked
$PATH
to make sure Ruby is configured properly. And I usedbundle info xxx
(orchef exec bundle info xxx
) to make sure the Gem is installed.Nothing helped to remove the errors.
What am I doing wrong and how to remove the message?
Test example:
The cookbook has
depends 'aws', '= 8.4.1'
inmetadata.rb
.I'm not an expert in Chef cookbooks, especially in testing. So I admit the possibility that I need to write tests somehow differently to make it work properly.
Appreciate any help.
The text was updated successfully, but these errors were encountered: