Skip to content

Commit

Permalink
Merge pull request #344 from aloismayr/master
Browse files Browse the repository at this point in the history
Improve order of parameters for agentlib
  • Loading branch information
opiethehokie authored Feb 27, 2017
2 parents 5d7f38b + f27be32 commit 15157e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/liberty_buildpack/framework/dynatrace_one_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def supports_apitoken?
#------------------------------------------------------------------------------------------
def get_service_options(credentials)
begin
@dynatrace_options = "#{SERVER}=#{server(credentials)},#{TENANT}=#{tenant(credentials)},#{TENANTTOKEN}=#{tenanttoken(credentials)}"
@dynatrace_options = "#{TENANT}=#{tenant(credentials)},#{TENANTTOKEN}=#{tenanttoken(credentials)},#{SERVER}=#{server(credentials)}"
rescue => e
@logger.error("Unable to process the service options for the Dynatrace OneAgent framework. #{e.message}")
end
Expand Down Expand Up @@ -252,7 +252,7 @@ def server_from_api
dynatrace_one_agent_manifest = File.join(@app_dir, DYNATRACE_HOME_DIR, 'manifest.json')
@logger.debug { "File exists?: #{dynatrace_one_agent_manifest} #{File.file?(dynatrace_one_agent_manifest)}" }
endpoints = JSON.parse(File.read(dynatrace_one_agent_manifest))['communicationEndpoints']
endpoints.join('\;')
endpoints.join(';')
end

def tenant(credentials)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ module LibertyBuildpack::Framework

it 'should return command line options for a valid service in a default container' do
pwd = ENV['PWD']
pattern = "^(-agentpath:#{pwd}/app/#{dynatrace_home}/agent/.*/libruxitagentloader.so=server=https://test-tenant.live.dynatrace.com,tenant=test-tenant,tenanttoken=test-token.*)$"
pattern = "^(-agentpath:#{pwd}/app/#{dynatrace_home}/agent/.*/libruxitagentloader.so=tenant=test-tenant,tenanttoken=test-token,server=https://test-tenant.live.dynatrace.com.*)$"

expect(released[0]).to match(/#{pattern}/)
end
Expand Down

0 comments on commit 15157e5

Please sign in to comment.