Sha256: 75084e51067f0024ddac55c95e5c3188c97a96f62bb9575f0d2d074c16f02c82

Contents?: true

Size: 1.34 KB

Versions: 31

Compression:

Stored size: 1.34 KB

Contents

module HybridPlatformsConductorTest

  module TestPlugins

    # Test plugin at node level using check-node results
    class NodeCheck < HybridPlatformsConductor::Test

      class << self

        # Sequences of nodes on which this test has been run
        # Array< [ Symbol,    String, String, String, Integer     ] >
        # Array< [ test_name, node,   stdout, stderr, exit_status ] >
        attr_accessor :runs

        # List of nodes for which we fail
        # Array<String>
        attr_accessor :fail_for

        # List of platform types that should only be concerned by this test
        # Array<Symbol>
        attr_accessor :only_on_platform_types

        # List of nodes that should only be concerned by this test
        # Array<Symbol>
        attr_accessor :only_on_nodes

      end

      # Check my_test_plugin.rb.sample documentation for signature details.
      def test_on_check_node(stdout, stderr, exit_status)
        raise 'Failing test' if NodeCheck.fail_for.include? @node

        NodeCheck.runs << [@name, @node, stdout, stderr, exit_status]
      end

      # Limit the list of platform types for these tests.
      #
      # Result::
      # * Array<Symbol> or nil: List of platform types allowed for this test, or nil for all
      def self.only_on_platforms
        NodeCheck.only_on_platform_types
      end

    end

  end

end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
hybrid_platforms_conductor-33.9.5 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.9.4 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.9.2 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.9.1 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.9.0 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.8.4 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.8.3 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.8.2 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.8.1 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.8.0 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.7.4 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.7.3 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.7.2 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.7.1 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.7.0 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.6.0 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.5.1 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.5.0 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.4.0 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb
hybrid_platforms_conductor-33.3.0 spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb