diff options
-rw-r--r-- | lib/chef/resource/yum_repository.rb | 2 | ||||
-rw-r--r-- | spec/unit/resource/yum_repository_spec.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/resource/yum_repository.rb b/lib/chef/resource/yum_repository.rb index 5f3d0eed15..4b927cf43f 100644 --- a/lib/chef/resource/yum_repository.rb +++ b/lib/chef/resource/yum_repository.rb @@ -52,8 +52,8 @@ class Chef property :mirrorlist, String property :mode, default: "0644" property :options, Hash - property :priority, String, regex: /^(\d?[0-9]|[0-9][0-9])$/ property :password, String + property :priority, String, regex: /^(\d?[1-9]|[0-9][0-9])$/ property :proxy_password, String property :proxy_username, String property :proxy, String diff --git a/spec/unit/resource/yum_repository_spec.rb b/spec/unit/resource/yum_repository_spec.rb index c3732c2eab..3ff9b85f88 100644 --- a/spec/unit/resource/yum_repository_spec.rb +++ b/spec/unit/resource/yum_repository_spec.rb @@ -41,6 +41,7 @@ describe Chef::Resource::YumRepository do expect { resource.priority "99" }.not_to raise_error(ArgumentError) expect { resource.priority "1" }.not_to raise_error(ArgumentError) expect { resource.priority "100" }.to raise_error(ArgumentError) + expect { resource.priority "0" }.to raise_error(ArgumentError) end it "the failovermethod property accepts 'priority' or 'roundrobin'" do |