Skip to content

Commit

Permalink
Update log tests to use env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle committed Jan 6, 2025
1 parent 0116d0f commit 1870dc2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/new_relic/agent/health_check_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ def test_agent_health_started_if_required_info_present
end

assert_log_contains(log, 'Agent control health check conditions met. Starting health checks.')
refute_log_contains(log, 'agent_control.fleet_id not found')
refute_log_contains(log, 'agent_control.health.delivery_location not found')
refute_log_contains(log, 'agent_control.health.frequency zero or less')
refute_log_contains(log, 'NEW_RELIC_AGENT_CONTROL_FLEET_ID not found')
refute_log_contains(log, 'NEW_RELIC_AGENT_CONTROL_HEALTH_DELIVERY_LOCATION not found')
refute_log_contains(log, 'NEW_RELIC_AGENT_CONTROL_HEALTH_FREQUENCY zero or less')
end
end

Expand All @@ -249,7 +249,7 @@ def test_agent_health_not_generated_if_agent_control_fleet_id_absent
end
end

assert_log_contains(log, 'agent_control.fleet_id not found')
assert_log_contains(log, 'NEW_RELIC_AGENT_CONTROL_FLEET_ID not found')
refute_log_contains(log, 'Agent control health check conditions met. Starting health checks.')
end
end
Expand All @@ -266,7 +266,7 @@ def test_agent_health_not_generated_if_delivery_location_absent
end
end

assert_log_contains(log, 'agent_control.health.delivery_location not found')
assert_log_contains(log, 'NEW_RELIC_AGENT_CONTROL_HEALTH_DELIVERY_LOCATION not found')
refute_log_contains(log, 'Agent control health check conditions met. Starting health checks.')
end
end
Expand All @@ -284,7 +284,7 @@ def test_agent_health_not_generated_if_frequency_is_zero
end
end

assert_log_contains(log, 'agent_control.health.frequency zero or less')
assert_log_contains(log, 'NEW_RELIC_AGENT_CONTROL_HEALTH_FREQUENCY zero or less')
refute_log_contains(log, 'Agent control health check conditions met. Starting health checks.')
end
end
Expand Down

0 comments on commit 1870dc2

Please sign in to comment.