summaryrefslogtreecommitdiff
path: root/spec/lib/peek/views/redis_detailed_spec.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-08-06 16:04:43 +0100
committerSean McGivern <sean@gitlab.com>2019-08-28 16:39:33 +0100
commit23c1cfcc110b52c1060f35a4a4a7816fb38adc6c (patch)
treeac75fd2c875e0aa487cba99b0db8bbea94078826 /spec/lib/peek/views/redis_detailed_spec.rb
parent7671c592f826f44be5a8a7dc947fba467f5df851 (diff)
downloadgitlab-ce-23c1cfcc110b52c1060f35a4a4a7816fb38adc6c.tar.gz
Return warnings for performance bar from backend
For each DetailedView subclass, we add a `warnings` array to: 1. The top-level response. 2. Each individual call under the `details` key. We use the `.thresholds` hash on the DetailedView to determine what's a warning. If that hash is empty (the default), then the warnings array will always be empty.
Diffstat (limited to 'spec/lib/peek/views/redis_detailed_spec.rb')
-rw-r--r--spec/lib/peek/views/redis_detailed_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/peek/views/redis_detailed_spec.rb b/spec/lib/peek/views/redis_detailed_spec.rb
index 61096e6c69e..fa9532226f2 100644
--- a/spec/lib/peek/views/redis_detailed_spec.rb
+++ b/spec/lib/peek/views/redis_detailed_spec.rb
@@ -21,10 +21,10 @@ describe Peek::Views::RedisDetailed, :request_store do
expect(subject.results[:details].count).to eq(1)
expect(subject.results[:details].first)
- .to eq({
- cmd: expected,
- duration: 1000
- })
+ .to include({
+ cmd: expected,
+ duration: 1000
+ })
end
end