Skip to content

Commit ce47362

Browse files
author
Jan Kunzmann
committed
check-mysql-replication-status: remove CodeClimate and skip standard execution of check
1 parent 2bcb51d commit ce47362

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

test/check-mysql-replication-status_spec.rb

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#
2828

2929
require_relative '../bin/check-mysql-replication-status'
30-
#require_relative './spec_helper.rb'
30+
require_relative './spec_helper.rb'
3131

3232
describe CheckMysqlReplicationStatus do
3333
let(:checker) { described_class.new }

test/spec_helper.rb

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,21 @@
1-
require 'codeclimate-test-reporter'
2-
CodeClimate::TestReporter.start
1+
RSpec.configure do |c|
2+
# Sensu plugins run in the context of an at_exit handler. This prevents
3+
# code-under-test from being run at the end of the rspec suite.
4+
c.before(:each) do
5+
Sensu::Plugin::CLI.class_eval do
6+
# PluginStub
7+
class PluginStub
8+
def run; end
9+
10+
def ok(*); end
11+
12+
def warning(*); end
13+
14+
def critical(*); end
15+
16+
def unknown(*); end
17+
end
18+
class_variable_set(:@@autorun, PluginStub)
19+
end
20+
end
21+
end

0 commit comments

Comments
 (0)