We are using this module within other modules that need to be unit tested
the Scoop module was failing b/c of missing facts, see error message below
I wanted to see if we could get this added to Doc, plus post it here just in case some else needed help
ERROR
Failure/Error: it { is_expected.to compile }
error during compilation: Evaluation Error: Error while evaluating a Resource Statement,
Evaluation Error: Operator '[]' is not applicable to an Undef Value. \
(file: spec/fixtures/modules/scoop/manifests/package.pp, line: 21, column: 27)
(file: manifests/init.pp, line: 19)
on node MyMac
manifests/init.pp is my module that calls scoop
line 19 is
scoop::package { '7zip':
ensure => 'present',
}
To remove this error needed to add facts to test run (describe ), in below manager.
We are using this module within other modules that need to be unit tested
the Scoop module was failing b/c of missing facts, see error message below
I wanted to see if we could get this added to Doc, plus post it here just in case some else needed help
ERROR
manifests/init.pp is my module that calls scoop
line 19 is
To remove this error needed to add facts to test run (describe ), in below manager.
tests like below started to work as well, just need to add one package, not all of them