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

Added documented fields to provision payload #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source 'https://rubygems.org'

gemspec
gem 'uuidtools', '~> 2.1.5'
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.6)
uuidtools (2.1.5)
webrobots (0.1.1)

PLATFORMS
Expand All @@ -81,3 +82,4 @@ DEPENDENCIES
rr (~> 1.0.4)
sinatra (~> 1.4.2)
timecop (~> 0.6.1)
uuidtools (~> 2.1.5)
5 changes: 4 additions & 1 deletion lib/heroku/kensa/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'timeout'
require 'uri'
require 'term/ansicolor'
require 'uuidtools'

module Heroku
module Kensa
Expand Down Expand Up @@ -281,9 +282,11 @@ def call!
:heroku_id => heroku_id,
:plan => data[:plan] || 'test',
:callback_url => callback,
:log_input_url => "https://token:[email protected]/logs",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this field is not actually always present, but I think we should add a test case that runs for add-ons which have this enabled.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bjeanes yep, that's correct. The log_input_url value is only sent in the payload if the add-on service has log_input in its manifest: https://devcenter.heroku.com/articles/add-on-provider-log-integration#setup

What would the test case for sending log_input_url cover? That the provisioning service accepts the request including log_input_url without issue?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, basically just that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the description in that link creates a structure(in the manifest) of
{ "api": { "requires": [ "log_input" ] } }
Is that correct? I'm new to add ons, so I've never seen it before.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nornholdj that's correct.

:logplex_token => nil,
:region => "amazon-web-services::us-east-1",
:options => data[:options] || {}
:options => data[:options] || {},
:uuid => UUIDTools::UUID.random_create.to_s
}

if data[:async]
Expand Down