Sha256: a49d811717b49d7915bb4ffe550778d9520d9cbf4724b677b8d81492583ae4bb

Contents?: true

Size: 891 Bytes

Versions: 29

Compression:

Stored size: 891 Bytes

Contents

module HybridPlatformsConductor

  module HpcPlugins

    module Test

      # Test that VEIDs are assigned correctly
      class Veids < HybridPlatformsConductor::Test

        # Check my_test_plugin.rb.sample documentation for signature details.
        def test
          # Get a map of VEIDs per node
          @nodes_handler.prefetch_metadata_of @nodes_handler.known_nodes, :veid
          veids = @nodes_handler.
            known_nodes.
            map { |node| [node, @nodes_handler.get_veid_of(node) ? @nodes_handler.get_veid_of(node).to_i : nil] }.
            to_h

          # Check there are no duplicates
          veids.group_by { |_node, veid| veid }.each do |veid, nodes|
            error "VEID #{veid} is used by the following nodes: #{nodes.map { |node, _veid| node }.join(', ')}" if !veid.nil? && nodes.size > 1
          end
        end

      end

    end

  end

end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hybrid_platforms_conductor-33.9.2 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.9.1 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.9.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.8.4 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.8.3 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.8.2 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.8.1 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.8.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.7.4 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.7.3 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.7.2 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.7.1 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.7.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.6.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.5.1 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.5.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.4.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.3.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.2.4 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-33.2.3 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb