Commit c14dbe21 authored by Lucas Nussbaum's avatar Lucas Nussbaum
Browse files

Add check for bug 8062 -- non-default resources should have available_upto=0

parent e706e272
Pipeline #51104 passed with stages
in 1 minute and 33 seconds
...@@ -27,6 +27,14 @@ module RefRepo::Valid::OarProperties ...@@ -27,6 +27,14 @@ module RefRepo::Valid::OarProperties
end end
end end
# Non-default resources must have available_upto = 0 (see bug 8062)
resources.select { |e| e['type'] != 'default' }.sort_by { |e| e['id'] }.each do |r|
if r['available_upto'] != 0
puts "Invalid available_upto value on #{r['id']} (type=#{r['type']}, state=#{r['state']}): #{r['available_upto']} (should be 0)"
ret = false
end
end
# Checking list of properties # Checking list of properties
names = default_resources.map { |e| e.keys.sort }.uniq.first - IGNORED_PROPERTIES names = default_resources.map { |e| e.keys.sort }.uniq.first - IGNORED_PROPERTIES
if names != G5K_PROPERTIES if names != G5K_PROPERTIES
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment