File: test_generator.rb

package info (click to toggle)
ruby-beaker-hostgenerator 1.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,556 kB
  • sloc: ruby: 3,059; makefile: 3
file content (27 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (4)
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
require "find"
require "yaml"

require "minitest/autorun"

require 'util/generator_helpers'

class TestGenerator < Minitest::Test
  include GeneratorTestHelpers

  def setup
    @default_options = [
      'centos6-64mdca',
    ]
  end

  def test_default_options
    hash = run_cli_with_options(@default_options)
    hosts = hash['HOSTS']

    assert_includes(hosts, "centos6-64-1")
    centos6 = hosts['centos6-64-1']
    ["master", "database", "dashboard", "agent"].each do |role|
      assert_includes(centos6['roles'], role)
    end
  end
end