mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
minor improvements in agent specs regarding pipeline metrics
Fixes #5848
This commit is contained in:
parent
907750f2e6
commit
b8f6970806
1 changed files with 4 additions and 3 deletions
|
@ -440,7 +440,7 @@ describe LogStash::Agent do
|
||||||
it "sets the success reload timestamp" do
|
it "sets the success reload timestamp" do
|
||||||
snapshot = subject.metric.collector.snapshot_metric
|
snapshot = subject.metric.collector.snapshot_metric
|
||||||
value = snapshot.metric_store.get_with_path("/stats/pipelines")[:stats][:pipelines][:main][:reloads][:last_success_timestamp].value
|
value = snapshot.metric_store.get_with_path("/stats/pipelines")[:stats][:pipelines][:main][:reloads][:last_success_timestamp].value
|
||||||
expect(value).to_not be(nil)
|
expect(value).to be_a(LogStash::Timestamp)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not set the last reload error" do
|
it "does not set the last reload error" do
|
||||||
|
@ -488,13 +488,14 @@ describe LogStash::Agent do
|
||||||
it "sets the failure reload timestamp" do
|
it "sets the failure reload timestamp" do
|
||||||
snapshot = subject.metric.collector.snapshot_metric
|
snapshot = subject.metric.collector.snapshot_metric
|
||||||
value = snapshot.metric_store.get_with_path("/stats/pipelines")[:stats][:pipelines][:main][:reloads][:last_failure_timestamp].value
|
value = snapshot.metric_store.get_with_path("/stats/pipelines")[:stats][:pipelines][:main][:reloads][:last_failure_timestamp].value
|
||||||
expect(value).to_not be(nil)
|
expect(value).to be_a(LogStash::Timestamp)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "sets the last reload error" do
|
it "sets the last reload error" do
|
||||||
snapshot = subject.metric.collector.snapshot_metric
|
snapshot = subject.metric.collector.snapshot_metric
|
||||||
value = snapshot.metric_store.get_with_path("/stats/pipelines")[:stats][:pipelines][:main][:reloads][:last_error].value
|
value = snapshot.metric_store.get_with_path("/stats/pipelines")[:stats][:pipelines][:main][:reloads][:last_error].value
|
||||||
expect(value).to_not be(nil)
|
expect(value).to be_a(Hash)
|
||||||
|
expect(value).to include(:message, :backtrace)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "increases the failed reload count" do
|
it "increases the failed reload count" do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue