From fd68ad34ef8ba5c79e2ca755c5cef252a570e75c Mon Sep 17 00:00:00 2001 From: David O'Sullivan Date: Fri, 26 May 2023 12:14:36 +0100 Subject: [PATCH] Polishing for Azure App Insights testing & Rubocop --- .../framework/azure_application_insights_agent.rb | 3 ++- .../framework/azure_application_insights_agent_spec.rb | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/java_buildpack/framework/azure_application_insights_agent.rb b/lib/java_buildpack/framework/azure_application_insights_agent.rb index 47b6d14c80..7ee630fe8f 100644 --- a/lib/java_buildpack/framework/azure_application_insights_agent.rb +++ b/lib/java_buildpack/framework/azure_application_insights_agent.rb @@ -33,7 +33,8 @@ def compile # (see JavaBuildpack::Component::BaseComponent#release) def release - credentials = @application.services.find_service(FILTER, [CONNECTION_STRING, INSTRUMENTATION_KEY])['credentials'] + credentials = @application.services.find_service(FILTER, [CONNECTION_STRING, + INSTRUMENTATION_KEY])['credentials'] if credentials.key?(CONNECTION_STRING) @droplet.java_opts.add_system_property('applicationinsights.connection.string', diff --git a/spec/java_buildpack/framework/azure_application_insights_agent_spec.rb b/spec/java_buildpack/framework/azure_application_insights_agent_spec.rb index c68d1933d9..06b2a957f4 100644 --- a/spec/java_buildpack/framework/azure_application_insights_agent_spec.rb +++ b/spec/java_buildpack/framework/azure_application_insights_agent_spec.rb @@ -34,8 +34,7 @@ before do allow(services).to receive(:one_service?).with(/azure-application-insights/, - 'connection_string', - 'instrumentation_key') + %w[connection_string instrumentation_key]) .and_return(true) end