Browse Source

disable if no procfs

pull/2/head
Fredrik Ekre 2 years ago
parent
commit
d21ae6937a
  1. 2
      test/runtests.jl

2
test/runtests.jl

@ -377,6 +377,7 @@ end
else else
@test length(metrics) == 0 @test length(metrics) == 0
end end
if procfs_available
# Not a pid # Not a pid
empty!(Prometheus.DEFAULT_REGISTRY.collectors) empty!(Prometheus.DEFAULT_REGISTRY.collectors)
procc = Prometheus.ProcessCollector(() -> "notapid") procc = Prometheus.ProcessCollector(() -> "notapid")
@ -389,6 +390,7 @@ end
metrics = @test_logs (:error, r"pid from the lambda") Prometheus.collect(procc) metrics = @test_logs (:error, r"pid from the lambda") Prometheus.collect(procc)
@test length(metrics) == 0 @test length(metrics) == 0
end end
end
@testset "Prometheus.expose(::Union{String, IO})" begin @testset "Prometheus.expose(::Union{String, IO})" begin
r = Prometheus.DEFAULT_REGISTRY r = Prometheus.DEFAULT_REGISTRY

Loading…
Cancel
Save