diff --git a/data/common.yaml b/data/common.yaml index 5ba9031..8b0a5b0 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -1,5 +1,4 @@ --- - # Defaults for Global DNS options networkmanager::enable_global_dns: false networkmanagerservers: [] @@ -19,4 +18,3 @@ networkmanager::ensure_service: 'running' networkmanager::service_name: 'NetworkManager' networkmanager::enable_service: true networkmanager::restart_service: ~ - diff --git a/manifests/dns.pp b/manifests/dns.pp index 4091529..cfa6c84 100644 --- a/manifests/dns.pp +++ b/manifests/dns.pp @@ -39,8 +39,6 @@ Optional[String[1]] $connection = undef, Boolean $notify_daemon = true, ) { - assert_private() - unless $facts['networkmanager_nmcli_path'] { fail("Did not found NetworkManager command line tool 'nmcli'.") } diff --git a/spec/classes/networkmanager_service_spec.rb b/spec/classes/networkmanager_service_spec.rb index ea764da..023b4e4 100644 --- a/spec/classes/networkmanager_service_spec.rb +++ b/spec/classes/networkmanager_service_spec.rb @@ -6,6 +6,15 @@ on_supported_os.each do |os, os_facts| context "on #{os}" do let(:facts) { os_facts } + let(:params) do + { + service_name: 'foobar', + enable: true, + ensure: 'running', + manage: true, + restart: nil, + } + end it { is_expected.to compile } end diff --git a/spec/defines/dns_spec.rb b/spec/defines/dns_spec.rb index c7b6a69..56dac9d 100644 --- a/spec/defines/dns_spec.rb +++ b/spec/defines/dns_spec.rb @@ -11,7 +11,7 @@ dns_options: '', } end - let(:pre_condition) { 'include networkmanager' } + let(:pre_condition) { 'class { "networkmanager::service": service_name => "foobar", enable => true, ensure => "running", manage => true, restart => "/bin/foo",}' } on_supported_os.each do |os, os_facts| context "on #{os}" do