Module: TestConfigLoader
- Defined in:
- lib/arver/test_config_loader.rb
Instance Method Summary collapse
Instance Method Details
#load_sample_tree ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/arver/test_config_loader.rb', line 3 def load_sample_tree Arver::Config.instance.tree= Arver::Tree.new @hg = Arver::Hostgroup.new "testG" @hg2 = Arver::Hostgroup.new "testG2" @h = Arver::Host.new "testH", @hg @h2 = Arver::Host.new "testH2", @hg2 @h3 = Arver::Host.new "testH3", @hg2 @d = Arver::Partition.new "testP1", @h @d2 = Arver::Partition.new "testP2", @h2 @d3 = Arver::Partition.new "testP3", @h3 @d4 = Arver::Partition.new "testP4", @h3 end |
#load_test_config ⇒ Object
16 17 18 19 20 21 |
# File 'lib/arver/test_config_loader.rb', line 16 def load_test_config Arver::LocalConfig.instance.config_dir= "spec/data" Arver::LocalConfig.instance.username= "test" config = Arver::Config.instance config.load end |