summaryrefslogtreecommitdiff
path: root/lib/custodian/parser.rb
AgeCommit message (Collapse)Author
2015-08-07Ensure that we correctly parse bogus macro-definitions.Steve Kemp
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.
2015-03-09Updated to test for more whitespace issues.Steve Kemp
2015-03-09Whitespace fixups.Steve Kemp
These were all identified and suggested by rubocop.
2015-03-09Removed spaces inside parenthesis.Steve Kemp
2015-03-09Prefer single-quotes when you don't need interpolation.Steve Kemp
So "foo" is less good than 'foo'.
2015-03-09Avoid bogus casing of method-name.Steve Kemp
So "getURL" becomes "get_url_contents"
2015-03-09Don't use parenthesis aroudn conditions in an if.Steve Kemp
2015-03-09Do not use parentheses for method calls with no arguments.Steve Kemp
This is neater. Flagged by rubocop
2015-03-09Avoid "Array.new" and "Hash.new"Steve Kemp
Instead use {} + ().
2015-03-09Omit the parentheses in defs when the method doesn't accept any arguments.Steve Kemp
This is neater.
2015-03-09Removed dead code.Steve Kemp
After raising an exception the following code could not be reached.
2015-03-09File.exists? is deprecated.Steve Kemp
We prefer "File.exist?". Flagged by rubocop.
2015-02-18Removed reference to timeout for tests.Steve Kemp
This was an invalid comment, the timeout related to HTTP-fetches.
2015-02-18Correctly parse tests with multiple implementation-types.Steve Kemp
We now parse a single test-definition into multiple test-implementations. This isn't required here because the parser only needs to know that the configuration file *can* be parsed, not what the result is. Validate that we got an array, but otherwise ignore the results after the first.
2014-10-13Remove lines which are just whitespace before parsingJames Hannah
2013-06-24 Use our utility class for time-period testing.Steve Kemp
This fixes #4551, and closes #4551.
2013-06-24 Updated comment to reflect reality.Steve Kemp
2013-02-19 Period definitions for tests.Steve Kemp
For example: example.vm must run ping between 09-17 otherwise 'daytime ping failed'.
2013-01-14 Remove the mauve-handlingSteve Kemp
2012-11-25 Removed references to sentinel.Steve Kemp
2012-11-24 Renamed 'custodian/protocoltest.rb' -> 'custodian/protocoltests.rb' to ↵Steve Kemp
match what we did with the alerts.
2012-11-24 Moved the protocol-test inclusion into a single file to avoid duplication.Steve Kemp
2012-11-24 Raise an exception if the test-factory doesn't succeed.Steve Kemp
2012-11-24 Updated to allow negative tests.Steve Kemp
2012-11-23 Comment updates.Steve Kemp
2012-11-23 Ensure that parse_line is given a line.Steve Kemp
2012-11-23 Allow a string/array to be passed to parse_linesSteve Kemp
2012-11-23 Updated the API for the parser to split parse_file into parse_lines.Steve Kemp
2012-11-22 Updated to rename the class.Steve Kemp
2012-11-22 Parse the configuration file into arrays of jobs, via our test-factorySteve Kemp
2012-11-21 Decouple the enqueuing from the parsing.Steve Kemp
2012-11-20 Default to a 200-status code check.Steve Kemp
2012-11-20 Repeat 5 times with timeout of 60 seconds. To avoid flaps.Steve Kemp
2012-11-20Adjusted regexs to be anchored at the beginning of the line, andPatrick J Cherry
expect just one word before "must".
2012-11-20Updated macro regexPatrick J Cherry
2012-11-19 Ensure that hostnames used for ping-tests are valid - to avoid the ↵Steve Kemp
security hole.
2012-11-18 UpdatedSteve Kemp
2012-11-17 WARN: The user if there is no status/content test for HTTP, or banner for ↵Steve Kemp
TCP-tests.
2012-11-17 Be verbose in all tests.Steve Kemp
2012-11-17 Parse the banner.Steve Kemp
2012-11-16 Removed executable bitSteve Kemp
2012-11-15 Added --test flagSteve Kemp
2012-11-15 Timeout in 12 second.Steve Kemp
2012-11-15 Raise an exception on a bogus line - and test for that.Steve Kemp
2012-11-15 Comment update.Steve Kemp
2012-11-15 Throw an exception if we attempt to redefine a macro.Steve Kemp
2012-11-14 Updated comments.Steve Kemp
2012-11-14 Abort on malformed-lines.Steve Kemp
2012-11-14 Change default timeout to 10 seconds.Steve Kemp
2012-11-14 Moved parser code into its own file, and updated main script + test suite ↵Steve Kemp
to use it.