Project

General

Profile

« Previous | Next » 

Revision e86db516

Added by Dmitri Dolguikh almost 9 years ago

Fixes #11229: changes in puppet modules are now being detected when listing available puppet classes

View differences:

test/puppet/class_scanner_test.rb
assert klasses.empty?
end
def test_should_scan_a_dir_with_cache
Proxy::Puppet::Plugin.load_test_settings(:use_cache => true)
Proxy::Puppet::PuppetCache.stubs(:read_from_cache).returns('./test/fixtures/modules_include' =>
{ 'testinclude' =>
{'timestamp' => Time.now.to_i,
'manifest' => [[Proxy::Puppet::PuppetClass.new('test')],
[Proxy::Puppet::PuppetClass.new('test::check::cache')]] }})
Proxy::Puppet::PuppetCache.stubs(:write_to_cache)
klasses = Proxy::Puppet::ClassScanner.scan_directory('./test/fixtures/modules_include', "example_env")
assert klasses.any? {|k| k.name == "check::cache" }
end
def test_should_extract_parameters__no_param_parenthesis
manifest = <<-EOF
class foreman::install {

Also available in: Unified diff