Skip to content

Commit

Permalink
fix: tests for archlinux
Browse files Browse the repository at this point in the history
archlinux ships prometheus >= 3.0.0 this is a quick hack to fix the tests
more work is needed to make the module compatible with prometheus >= 3.0.0
  • Loading branch information
TheMeier committed Dec 29, 2024
1 parent 3c69468 commit 90ad55c
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions spec/acceptance/prometheus_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,20 @@
end
end

it 'can access static files' do
shell('curl -s http://127.0.0.1:9090/graph') do |r|
expect(r.stdout).to match(%r{doctype html})
expect(r.exit_code).to eq(0)
if host_inventory['facter']['os']['name'] == 'Archlinux'
# Archlinux ships promethes >= 3.0.0
it 'can access static files' do
shell('curl -s http://127.0.0.1:9090/query') do |r|
expect(r.stdout).to match(%r{doctype html})
expect(r.exit_code).to eq(0)
end
end
else
it 'can access static files' do
shell('curl -s http://127.0.0.1:9090/graph') do |r|
expect(r.stdout).to match(%r{doctype html})
expect(r.exit_code).to eq(0)
end
end
end

Expand Down

0 comments on commit 90ad55c

Please sign in to comment.