Sha256: 6af4b995783793a7057fa0399e2d58792079c860ecf4a1acb20f371317e1ce95

Contents?: true

Size: 890 Bytes

Versions: 36

Compression:

Stored size: 890 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 = Hash[@nodes_handler.
            known_nodes.
            map { |node| [node, @nodes_handler.get_veid_of(node) ? @nodes_handler.get_veid_of(node).to_i : nil] }
          ]

          # 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

36 entries across 36 versions & 1 rubygems

Version Path
hybrid_platforms_conductor-33.0.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.18.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.17.1 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.17.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.16.4 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.16.3 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.16.2 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.16.1 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.16.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.15.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.14.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.13.4 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.13.3 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.13.2 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.13.1 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.13.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.12.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.11.2 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.11.1 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb
hybrid_platforms_conductor-32.11.0 lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb