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.
|
|
Rather than:
with auth 'username:password'
We use:
http://user:pass@example.com/
|
|
|
|
|
|
|
|
They fail.
|
|
|
|
This involved silencing a few issues that were judged to be minor,
and changing various whitespaces and function-calls. The most
obvious example was changing this:
assert(ret.kind_of? Array)
To this:
assert(ret.kind_of?(Array))
|
|
|
|
|
|
We cannot allow HTTP/HTTPS to be limited by protocol,
such as IPv4-only or IPv6-only. Raise an error in the
parser if this is attempted.
Added test-case to confirm, and this closes #12488.
|
|
It should match the next occurrence of the opening quote type, not the
last.
|
|
The redis and rubocop tests now skip on ruby > 2.0 (I think)
|
|
It now matches "can't match" and 'he said "ha!"'.
Added tests.
|
|
The beanstalkd queue used to be used in the past, and we later
added support for Redis via a simple abstraction layer. But now
we've no longer tested and used beanstalkd for over a year, and
the client-libraries are no longer available as native Debian
packages.
With that in mind we've excised the code, although left the
abstraction-class in-place.
|
|
We've always had an implicit rule in macro-definitions, that they
end with a period. This meant that the first line is valid:
FOO is bar.vm.bytemark.co.uk.
However we'd expect this to fail:
FOO is bar.vm.bytemark.co.uk
A similar issue would arise if a macro-definition involved more than
one host, only the first would be valid.
We've fixed this now, such that the trailing period is optional.
|
|
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 allows you to write the following (identical) tests:
foo must run FTP.
foo must run ftp.
foo must run FtP.
This is mostly a neatness update.
|
|
This will ensure that it uses the correct port.
|
|
Specifically that we can get the value back as a string, and
work with the ordinal too.
|
|
Rather than having "inverted" we now name the test-method
"inverted?" which is more ideomatic.
|
|
Hard-coding IPs is a bad choice, but the alternative here is to
exec( `dig -t a`) or similar which seems equally bad.
|
|
We now use the Test::Unit::TestCase.skip() method if the
gem is missing, rather than kill the whole suite.
|
|
The method-stubbing doesn't work, and so it is obsolete.
|
|
This is designed to ensure that we meet the style/code guideline
defined in `.rubocop.yml`.
|
|
|
|
|
|
|
|
These were all identified and suggested by rubocop.
|
|
|
|
So "foo" is less good than 'foo'.
|
|
Ruby is not Perl, much as I sometimes wish it were.
|
|
|
|
This is neater. Flagged by rubocop
|
|
Instead use {} + ().
|
|
This is neater.
|
|
Instead prefer ".".
Flagged by rubocop
|
|
|
|
Instead of "$0" use $PROGRAM_NAME, instead of $! use "$LOAD_PATH". This
is more explicit and less-magic.
Flagged by rubocop
|
|
This fully explores the parsing and unparsing of the test-objects,
with the exceptions of DNS, FTP, LDAP, and SSLCertificates.
|
|
Now we have multiple HTTP-implementations we need to update to
make sure they're all caught.
|
|
The class-factory for instantiating tests now returns an array
rather than a string.
|
|
Now that the class-factory returns an Array, we've updated the
test-cases to continue to pass.
|
|
|
|
|
|
|
|
This will be needed when we want to save to the redis-log.
|
|
|
|
|
|
These days google.com resolves over both IPv4 and IPv6.
|