|
3 | 3 | require "spec_helper" |
4 | 4 |
|
5 | 5 | RSpec.describe :redis_logger do |
6 | | - let(:redis) { Redis.new(host: "127.0.0.1") } |
| 6 | + let(:redis) { Redis.new(host: REDIS_HOST) } |
7 | 7 |
|
8 | 8 | before do |
9 | 9 | perform_basic_setup do |config| |
|
20 | 20 | expect(result).to eq("OK") |
21 | 21 | expect(Sentry.get_current_scope.breadcrumbs.peek).to have_attributes( |
22 | 22 | category: "db.redis", |
23 | | - data: { commands: [{ command: "SET", key: "key" }], server: "127.0.0.1:6379/0" } |
| 23 | + data: { commands: [{ command: "SET", key: "key" }], server: "#{REDIS_HOST}:6379/0" } |
24 | 24 | ) |
25 | 25 | end |
26 | 26 | end |
|
34 | 34 | expect(result).to eq("OK") |
35 | 35 | expect(Sentry.get_current_scope.breadcrumbs.peek).to have_attributes( |
36 | 36 | category: "db.redis", |
37 | | - data: { commands: [{ command: "SET", key: "key", arguments: "value" }], server: "127.0.0.1:6379/0" } |
| 37 | + data: { commands: [{ command: "SET", key: "key", arguments: "value" }], server: "#{REDIS_HOST}:6379/0" } |
38 | 38 | ) |
39 | 39 | end |
40 | 40 |
|
|
62 | 62 | expect(result.key?("uptime_in_days")).to eq(true) |
63 | 63 | expect(Sentry.get_current_scope.breadcrumbs.peek).to have_attributes( |
64 | 64 | category: "db.redis", |
65 | | - data: { commands: [{ command: "INFO", key: nil }], server: "127.0.0.1:6379/0" } |
| 65 | + data: { commands: [{ command: "INFO", key: nil }], server: "#{REDIS_HOST}:6379/0" } |
66 | 66 | ) |
67 | 67 | end |
68 | 68 | end |
|
88 | 88 | { command: "INCR", key: "counter" }, |
89 | 89 | { command: "EXEC", key: nil } |
90 | 90 | ], |
91 | | - server: "127.0.0.1:6379/0" |
| 91 | + server: "#{REDIS_HOST}:6379/0" |
92 | 92 | } |
93 | 93 | ) |
94 | 94 | end |
|
105 | 105 | expect(result).to eq("OK") |
106 | 106 | expect(Sentry.get_current_scope.breadcrumbs.peek).to have_attributes( |
107 | 107 | category: "db.redis", |
108 | | - data: { commands: [{ command: "SET", key: "key" }], server: "127.0.0.1:6379/0" } |
| 108 | + data: { commands: [{ command: "SET", key: "key" }], server: "#{REDIS_HOST}:6379/0" } |
109 | 109 | ) |
110 | 110 | end |
111 | 111 | end |
|
0 commit comments