Class: HybridPlatformsConductor::TestByService

Inherits:
Test
  • Object
show all
Defined in:
lib/hybrid_platforms_conductor/test_by_service.rb

Overview

Ancestor for all tests that should be run just once per service

Constant Summary

Constants included from LoggerHelpers

LoggerHelpers::LEVELS_MODIFIERS, LoggerHelpers::LEVELS_TO_STDERR

Instance Attribute Summary

Attributes inherited from Test

#errors, #expected_failure, #name, #node, #platform

Class Method Summary collapse

Methods inherited from Test

#assert_equal, #assert_match, #error, #executed, #executed?, #initialize, only_on_platforms, #to_s

Methods inherited from Plugin

extend_config_dsl_with, #initialize, valid?

Methods included from LoggerHelpers

#err, #init_loggers, #log_component=, #log_debug?, #log_level=, #out, #section, #set_loggers_format, #stderr_device, #stderr_device=, #stderr_displayed?, #stdout_device, #stdout_device=, #stdout_displayed?, #stdouts_to_s, #with_progress_bar

Constructor Details

This class inherits a constructor from HybridPlatformsConductor::Test

Class Method Details

.only_on_nodesObject

Limit the list of nodes for these tests.

Result
  • Array<String or Regex> or nil: List of nodes allowed for this test, or nil for all. Regular expressions matching node names can also be used.



10
11
12
13
14
15
16
17
18
# File 'lib/hybrid_platforms_conductor/test_by_service.rb', line 10

def self.only_on_nodes
  # Just 1 node per service and platform
  Test.nodes_handler. Test.nodes_handler.known_nodes, :services
  Test.nodes_handler.
    known_nodes.
    sort.
    group_by { |node| Test.nodes_handler.get_services_of(node).sort }.
    map { |(_service, _platform), nodes| nodes.first }
end