diff --git a/lib/puppet-catalog-test/puppet_adapter_factory.rb b/lib/puppet-catalog-test/puppet_adapter_factory.rb index d36b318..9924efb 100644 --- a/lib/puppet-catalog-test/puppet_adapter_factory.rb +++ b/lib/puppet-catalog-test/puppet_adapter_factory.rb @@ -13,9 +13,11 @@ def self.create_adapter(config) return Puppet4xAdapter.new(config) elsif Puppet.version.start_with?("5.") return Puppet4xAdapter.new(config) + elsif Puppet.version.start_with?("6.") + return Puppet4xAdapter.new(config) end - raise RuntimeException, "Unsupported Puppet version detected (#{Puppet.version})" + raise RuntimeError, "Unsupported Puppet version detected (#{Puppet.version})" end end end diff --git a/lib/puppet-catalog-test/test_runner.rb b/lib/puppet-catalog-test/test_runner.rb index 56bc3da..79145d6 100644 --- a/lib/puppet-catalog-test/test_runner.rb +++ b/lib/puppet-catalog-test/test_runner.rb @@ -74,7 +74,7 @@ def compile_catalog(node_fqdn, facts = {}) hostname = node_fqdn.split('.').first facts['hostname'] = hostname - node = @puppet_adapter.create_node(hostname, facts) + node = @puppet_adapter.create_node(node_fqdn, facts) @puppet_adapter.compile(node) end