David Sandilands
01/27/2025, 1:35 PMralfbosz
01/27/2025, 2:41 PMralfbosz
01/27/2025, 2:42 PMTheMeier
01/28/2025, 8:19 AMon_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) do
os_facts.merge(networking: { fqdn: 'my.domain.foo' })
end
but $facts{'networking']['fqdn']
always has the value defined in spec/default_facts.yml
Joel Wilson
02/25/2025, 5:38 PMbastelfreak
02/25/2025, 5:43 PMbastelfreak
02/25/2025, 5:43 PMJoel Wilson
02/25/2025, 5:43 PMspec_helper_acceptance.rb
Joel Wilson
02/25/2025, 5:43 PMbastelfreak
02/25/2025, 5:43 PMJoel Wilson
02/25/2025, 5:43 PMTheMeier
02/28/2025, 1:35 PMEd Rude
03/11/2025, 10:47 AMBrian Schonecker
04/28/2025, 12:36 PMerror during compilation: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, wrong number of arguments (given 3, expected 1..2)
The class module (if you can call it that) couldn't be more simple:
--class manhattan::a {
concat { '/bin/foo':
owner => 'root',
group => 'root',
mode => '0755',
}
}
bundle references me to:
concat/manifests/init.pp, line: 107, column: 27)
but for the life of me I can't figure out what's going on. The class module passes all other tests. My .fixtures.yml file references:
concat:
repo: "<https://github.com/puppetlabs/puppetlabs-concat.git>"
ref: "v9.0.2"
The spec file is:
require 'spec_helper'
describe 'manhattan::a' do
it { <http://is_expected.to|is_expected.to> compile }
end
It doesn't get much more simple than that. Can anyone shed light on what I might be doing wrong?bastelfreak
04/28/2025, 12:38 PMbastelfreak
04/28/2025, 12:38 PMYury Bushmelev
05/08/2025, 5:40 AMkernel
fact value to make my Linux-confined fact unit test to work on MacOS.Yury Bushmelev
05/08/2025, 5:42 AMFacter.clear
in before :each
hook, which looks legit but I should recheck the sources/documentation regarding this đ¤Yury Bushmelev
05/08/2025, 5:44 AMWouter Mellema
05/21/2025, 9:23 AMpuppet-nvm
running with litmus and docker instead of beaker. After quite a few hours of trial and error, the tests finally run. However, i'm hit with the following error across all tests:
nvm class running puppet code Command ". /etc/profile.d/nvm.sh && nvm ls" stdout
On host `localhost:52343'
Failure/Error: its(:stdout) { should match /0.10.36/ }
ArgumentError:
wrong number of arguments (given 1, expected 2)
Wouter Mellema
05/21/2025, 9:24 AMdescribe command('. /etc/profile.d/nvm.sh && nvm ls') do
its(:exit_status) { should eq 0 }
its(:stdout) { should match /0.10.36/ }
end
kenyon
05/21/2025, 6:25 PMWouter Mellema
05/23/2025, 1:57 PMdescribe command
syntax and the its
syntax SHOULD be valid serverspec as described at the litmus docs. It works for things like describe file
, but not for command
. That's the issue I want to fix :)Yury Bushmelev
05/23/2025, 2:21 PMcommand('source /etc/profile.d/nvm.sh && nvm ls')
.. I saw some problems with .
few times in other context.. wouldnât be surprised if it causes some issuesYury Bushmelev
05/23/2025, 2:22 PMcommand()
doesnât use shellWouter Mellema
05/23/2025, 4:55 PMsource
, nothing changes unfortunately. It seems that, somehow, the syntax of the test itself is wrong. There are some tests specified that run as a user, with a specific shell, but those also fail with the same error. Example included underneath
describe command('su - foo -c "source /home/foo/.nvm/nvm.sh && nvm --version" -s /bin/bash') do
Wouter Mellema
05/23/2025, 4:58 PMls /
, it breaks the same way
5) nvm::npm define install local package Command "ls /" exit_status
On host `localhost:52507'
Failure/Error: its(:exit_status) { <http://is_expected.to|is_expected.to> eq 0 }
ArgumentError:
wrong number of arguments (given 1, expected 2)
# /home/wmellema/.pdk/cache/ruby/3.2.0/gems/bolt-4.0.0/lib/bolt_spec/run.rb:52:in `run_command'
# /home/wmellema/.pdk/cache/ruby/3.2.0/gems/serverspec-2.43.0/lib/serverspec/type/command.rb:28:in `command_result'
# /home/wmellema/.pdk/cache/ruby/3.2.0/gems/serverspec-2.43.0/lib/serverspec/type/command.rb:18:in `exit_status'
# ./spec/acceptance/02_nvm_npm_spec.rb:42:in `block (4 levels) in <top (required)>'
Jacob McGee
06/03/2025, 5:06 PMyachub
06/06/2025, 7:41 PMlet(:params) { {'password' =>sensitive('secret') } }
as described at https://www.rubydoc.info/gems/rspec-puppet, but it seems like pdk test unit
is still attempting to open eyaml keys, which don't exist in CI. Related, I know onceover has the ability to use a separate hiera.yaml
file where the suggestion is to remove the eyaml config options, but not sure if pdk/rspec-puppet supports anything like that.jesse
06/13/2025, 5:10 AM