Sha256: a4c60217c5e26923efeab40e20de3a9208eb48abc64e09ba07af1d276a66c8ee

Contents?: true

Size: 924 Bytes

Versions: 29

Compression:

Stored size: 924 Bytes

Contents

module HybridPlatformsConductorTest

  module Helpers

    module CmdbHelpers

      # Get a given CMDB instance to be tested
      #
      # Parameters::
      # * *name* (Symbol): The CMDB name
      # Result::
      # * Cmdb: The CMDB instance
      def cmdb(name)
        test_nodes_handler.instance_variable_get(:@cmdbs)[name]
      end

      # Register test CMDBs in the test nodes handler as the only CMDB available
      #
      # Parameters::
      # * *cmdb_names* (Array<Symbol>): The test CMDBs to register [default = [:test_cmdb]]
      def register_test_cmdb(cmdb_names = [:test_cmdb])
        register_plugins(
          :cmdb,
          cmdb_names.map do |plugin_id|
            [
              plugin_id,
              HybridPlatformsConductorTest::CmdbPlugins.const_get(plugin_id.to_s.split('_').collect(&:capitalize).join.to_sym)
            ]
          end.to_h
        )
      end

    end

  end

end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hybrid_platforms_conductor-33.9.2 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.9.1 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.9.0 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.8.4 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.8.3 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.8.2 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.8.1 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.8.0 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.7.4 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.7.3 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.7.2 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.7.1 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.7.0 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.6.0 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.5.1 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.5.0 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.4.0 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.3.0 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.2.4 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb
hybrid_platforms_conductor-33.2.3 spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb