diff --git a/manifests/init.pp b/manifests/init.pp index e198614..25d81fa 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -6,8 +6,4 @@ class domain ( $customer = if $trusted[domain] =~ /^([^.]+)\.([^.]+)\.lan$/ { $2 }, $site = if $trusted[domain] =~ /^([^.]+)\.([^.]+)\.lan$/ { $1 }, -) { - if !$customer or !$site { - fail("Could not parse from (trusted) domain ${$trusted[domain]}, params must be provided explicitly") - } -} +) {} diff --git a/metadata.json b/metadata.json index cc47707..439bd93 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "mindhive-domain", - "version": "0.1.1", + "version": "0.1.2", "author": "damon@mindhive.co.nz", "summary": "", "license": "MIT", diff --git a/spec/classes/domain_spec.rb b/spec/classes/domain_spec.rb index 8941f69..dc3df0d 100644 --- a/spec/classes/domain_spec.rb +++ b/spec/classes/domain_spec.rb @@ -26,7 +26,7 @@ context 'invalid domain' do let(:node) { 'wrong.parse' } - it { is_expected.to compile.with_all_deps.and_raise_error(/Evaluation Error/) } + it { is_expected.to contain_class('domain').with({ 'customer' => nil, 'site' => nil }) } end end