Skip to content

Commit acc0bdc

Browse files
committed
node_group type: output wrong environment name
1 parent 519bc30 commit acc0bdc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/puppet/type/node_group.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def insync?(is)
123123
desc 'Environment for this group'
124124
defaultto :production
125125
validate do |value|
126-
raise('Invalid environment name') unless value =~ (%r{\A[a-z0-9_]+\Z}) || (value == 'agent-specified')
126+
raise("Invalid environment name: #{value}") unless value =~ (%r{\A[a-z0-9_]+\Z}) || (value == 'agent-specified')
127127
end
128128
end
129129
newproperty(:classes) do

spec/unit/puppet/type/node_group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
name: 'stubname',
5454
environment: 'not-a-valid-name',
5555
)
56-
}.to raise_error(%r{Invalid environment name})
56+
}.to raise_error(%r{Invalid environment name: not-a-valid-name})
5757
end
5858

5959
it 'allows name with symbols, numbers, and whitespace' do

0 commit comments

Comments
 (0)