Age | Commit message (Collapse) | Author |
|
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.
|
|
This is a failure case which is not 100% clear.
This closes #4.
|
|
These warnings were largely whitespace-based.
|
|
In the past we needed to write:
must run tcp on 3306.
Now we can add the "port" to match the rest of the tests:
must run tcp on port 3306.
|
|
This update consists of two changes:
* No longer return "true" or "false" instead return "TEST_FAILED", or "TEST_SUCCEEDED".
* Removed the testing of test-inversion from the class, now it lives in the base-class where it should have done all along.
|
|
This was failing because '$ERROR_INFO' is only available if
you
require 'English'
|
|
|
|
|
|
These were all identified and suggested by rubocop.
|
|
|
|
So "foo" is less good than 'foo'.
|
|
The last expression of a method is the return value. So:
def foo; false ; end
Is the same as:
def foo; return false; end
|
|
|
|
This is neater. Flagged by rubocop
|
|
Instead use {} + ().
|
|
This:
def foo
line
end
Is the same as this:
def foo
return( line )
end
|
|
Instead of "$0" use $PROGRAM_NAME, instead of $! use "$LOAD_PATH". This
is more explicit and less-magic.
Flagged by rubocop
|
|
Via "ipv6_only" and "IPv4_only"
|
|
If a target is a hostname we'll explicitly resolve it for
both IPv4 and IPv6.
|
|
|
|
|
|
|
|
|
|
The global configuration file, /etc/custodian/custodian.cfg, has a
timeout=XX setting in it. Until now we've ignored it and used a
fixed timeout of 20/30 seconds.
Now we fully honour the specified value.
|
|
Each test has been updated to pass a regexp object to the
tcp.rb primitive which actually does the socket connection.
This closes #4036
|
|
|
|
|
|
|
|
|
|
Allow test-inversion via "must not run".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|