Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #66 from mmay/master
Browse files Browse the repository at this point in the history
Don't die simply because config var is missing from provisioning response
  • Loading branch information
bjeanes committed Jan 14, 2014
2 parents bc974fd + 0ed3b2c commit ffbc5c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/heroku/kensa/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
require 'socket'
require 'timeout'
require 'uri'
require 'term/ansicolor'

module Heroku
module Kensa
Expand Down Expand Up @@ -164,6 +165,7 @@ def call!


class ProvisionResponseCheck < Check
include Term::ANSIColor

def call!
response = data[:provision_response]
Expand Down Expand Up @@ -192,7 +194,7 @@ def call!
difference = data['api']['config_vars'] - response['config'].keys
unless difference.empty?
verb = (difference.size == 1) ? "is" : "are"
error "#{difference.join(', ')} #{verb} missing from the manifest"
print "\n\t", yellow( "#{difference.join(', ')} #{verb} missing from the manifest")
end
true
end
Expand Down
5 changes: 0 additions & 5 deletions test/provision_response_check_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ def check ; ProvisionResponseCheck ; end
assert_invalid
end

test "asserts all vars in manifest are in response" do
@response["config"].delete('MYADDON_CONFIG')
assert_invalid
end

test "is valid otherwise" do
@response["config"]["MYADDON_URL"] = "http://localhost/abc"
assert_valid
Expand Down

0 comments on commit ffbc5c7

Please sign in to comment.