aboutsummaryrefslogtreecommitdiff
path: root/test/tc_mauve_configuration_builder.rb
blob: 8a86e9c949074cc17c52f74c5878a04938655ce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$:.unshift "../lib/"

require 'th_mauve'
require 'mauve/configuration_builder'

class TcMauveConfigurationBuilder < Mauve::UnitTest

  def setup
    super
    setup_logger
  end

  def teardown
    super
    teardown_logger
  end

  def test_source_list
    config =<<EOF
source_list "sources", %w(
  test-1.example.com
  imaginary.host.example.com
  192.168.100.1/24
  *.imaginary.example.com
)
EOF

    x = nil
    assert_nothing_raised { x = Mauve::ConfigurationBuilder.parse(config) }

    x.source_lists["sources"].resolve
  end

end