summaryrefslogtreecommitdiff
path: root/t/test-custodian-util-ping.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2017-08-10 10:17:51 +0300
committerSteve Kemp <steve@steve.org.uk>2017-08-10 10:17:51 +0300
commit63e2d2f2ec87d833408b7e8b6fb33e3f0fa0c804 (patch)
tree18cd4b93e09a5c56f3e47d0fd2693372e51634a7 /t/test-custodian-util-ping.rb
parent005013d98d742989d3c000b04054e15bb0482a69 (diff)
Significant rubocop fixups.
This merge-request contains almost entirely mechanical changes, with a few exceptions: * I changed `do_ipv4` and `do_ipv6` to `ipv4` and `ipv6` respectively. * This fixed a warning about normal-casing. * I changed a test-case to compare against both `Integer` and `Fixnum` * Suspect this is a ruby-versionism. The tests continue to pass, so I believe this is safe to merge, but of course it is still not 100%: lib/custodian/queue.rb:135:21: W: Assignment in condition - you probably meant to use ==. added = true ^ lib/custodian/protocoltest/ssl.rb:218:5: W: Do not shadow rescued Exceptions rescue OpenSSL::SSL::SSLError => err ... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/custodian/protocoltest/ssl.rb:286:5: W: Do not shadow rescued Exceptions rescue OpenSSL::SSL::SSLError => err ... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/custodian/protocoltest/http.rb:307:7: C: Assignment Branch Condition size for run_test is too high. [84.53/72] def run_test ^^^ lib/custodian/protocoltest/http.rb:307:7: C: Cyclomatic complexity for run_test is too high. [22/19] def run_test ^^^ lib/custodian/protocoltest/http.rb:307:7: C: Method has too many lines. [97/87] def run_test ... ^^^^^^^^^^^^ lib/custodian/protocoltest/http.rb:307:7: C: Perceived complexity for run_test is too high. [23/21] def run_test In short this takes care of _most_ of the warnings, but updates requiring significant code-change have not been applied.
Diffstat (limited to 't/test-custodian-util-ping.rb')
-rwxr-xr-xt/test-custodian-util-ping.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-custodian-util-ping.rb b/t/test-custodian-util-ping.rb
index 99b61c1..d7d16b8 100755
--- a/t/test-custodian-util-ping.rb
+++ b/t/test-custodian-util-ping.rb
@@ -63,7 +63,7 @@ class TestPingUtil < Test::Unit::TestCase
# Test lookup of hosts that don't work
#
def test_lookup_fail
- %w( tessf.dfsdf.sdf.sdfsdf fdsfkljflj3.fdsfds.f3.dfs ).each do |name|
+ %w(tessf.dfsdf.sdf.sdfsdf fdsfkljflj3.fdsfds.f3.dfs).each do |name|
assert_nothing_raised do
helper = Custodian::Util::Ping.new(name)