Sha256: f7ebe3d88b8bd0f9a567743d3e3fdf419079bbf115ea1cb39ca370456e9f7bd2

Contents?: true

Size: 693 Bytes

Versions: 5

Compression:

Stored size: 693 Bytes

Contents

require_relative './test_xml_generator'

class TestXmlLogparser < Test::Unit::TestCase
  def test_postbuild_logparser
    builder = JenkinsJob::Builder.new

    builder.freestyle 'foo' do
      postbuild do
        logparser '/var/lib/jenkins/build_parsing_rules' do
          fail_on_error
        end
      end
    end

    actual = builder.config_as_xml_node('foo')

    { 'unstableOnWarning' => 'false',
      'failBuildOnError' => 'true',
      'parsingRulesPath' => '/var/lib/jenkins/build_parsing_rules'
     }.each do |k, v|
       assert_equal v, actual.xpath("./project/publishers/hudson.plugins.logparser.LogParserPublisher/#{k}").text, k
     end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubyjobbuilderdsl-0.0.5 test/test_logparser.rb
rubyjobbuilderdsl-0.0.3 test/test_logparser.rb
rubyjobbuilderdsl-0.0.2 test/test_logparser.rb
rubyjobbuilderdsl-0.0.1 test/test_logparser.rb
rubyjobbuilderdsl-0.0.0 test/test_logparser.rb