hybrid_platforms_conductor 32.17.0 → 33.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -0
  3. data/README.md +6 -3
  4. data/bin/check-node +0 -1
  5. data/bin/deploy +0 -1
  6. data/bin/get_impacted_nodes +0 -1
  7. data/bin/last_deploys +12 -8
  8. data/bin/nodes_to_deploy +6 -6
  9. data/bin/setup +6 -6
  10. data/bin/topograph +1 -1
  11. data/docs/config_dsl.md +45 -1
  12. data/docs/executables.md +6 -7
  13. data/docs/executables/check-node.md +3 -3
  14. data/docs/executables/deploy.md +3 -3
  15. data/docs/executables/dump_nodes_json.md +3 -3
  16. data/docs/executables/test.md +3 -3
  17. data/docs/executables/topograph.md +3 -3
  18. data/docs/gen/mermaid/README.md-0.png +0 -0
  19. data/docs/gen/mermaid/docs/executables/check-node.md-0.png +0 -0
  20. data/docs/gen/mermaid/docs/executables/deploy.md-0.png +0 -0
  21. data/docs/gen/mermaid/docs/executables/free_ips.md-0.png +0 -0
  22. data/docs/gen/mermaid/docs/executables/get_impacted_nodes.md-0.png +0 -0
  23. data/docs/gen/mermaid/docs/executables/last_deploys.md-0.png +0 -0
  24. data/docs/gen/mermaid/docs/executables/nodes_to_deploy.md-0.png +0 -0
  25. data/docs/gen/mermaid/docs/executables/report.md-0.png +0 -0
  26. data/docs/gen/mermaid/docs/executables/run.md-0.png +0 -0
  27. data/docs/gen/mermaid/docs/executables/ssh_config.md-0.png +0 -0
  28. data/docs/gen/mermaid/docs/executables/test.md-0.png +0 -0
  29. data/docs/plugins.md +46 -0
  30. data/docs/plugins/connector/ssh.md +1 -1
  31. data/docs/plugins/log/remote_fs.md +26 -0
  32. data/docs/plugins/secrets_reader/cli.md +31 -0
  33. data/docs/plugins/secrets_reader/thycotic.md +46 -0
  34. data/docs/plugins/test/check_deploy_and_idempotence.md +1 -1
  35. data/docs/plugins/test/connection.md +1 -0
  36. data/docs/plugins/test/deploy_removes_root_access.md +1 -1
  37. data/docs/plugins/test/file_system.md +1 -0
  38. data/docs/plugins/test/hostname.md +1 -0
  39. data/docs/plugins/test/ip.md +1 -0
  40. data/docs/plugins/test/local_users.md +1 -0
  41. data/docs/plugins/test/mounts.md +1 -0
  42. data/docs/plugins/test/orphan_files.md +1 -0
  43. data/docs/plugins/test/ports.md +1 -0
  44. data/docs/plugins/test/spectre.md +1 -0
  45. data/docs/plugins/test/vulnerabilities.md +1 -0
  46. data/lib/hybrid_platforms_conductor/action.rb +4 -4
  47. data/lib/hybrid_platforms_conductor/actions_executor.rb +45 -43
  48. data/lib/hybrid_platforms_conductor/bitbucket.rb +5 -4
  49. data/lib/hybrid_platforms_conductor/cmd_runner.rb +13 -12
  50. data/lib/hybrid_platforms_conductor/cmdb.rb +2 -2
  51. data/lib/hybrid_platforms_conductor/common_config_dsl/bitbucket.rb +2 -1
  52. data/lib/hybrid_platforms_conductor/common_config_dsl/confluence.rb +2 -1
  53. data/lib/hybrid_platforms_conductor/common_config_dsl/file_system_tests.rb +5 -4
  54. data/lib/hybrid_platforms_conductor/common_config_dsl/github.rb +4 -3
  55. data/lib/hybrid_platforms_conductor/common_config_dsl/idempotence_tests.rb +2 -2
  56. data/lib/hybrid_platforms_conductor/config.rb +8 -4
  57. data/lib/hybrid_platforms_conductor/confluence.rb +1 -1
  58. data/lib/hybrid_platforms_conductor/connector.rb +5 -2
  59. data/lib/hybrid_platforms_conductor/core_extensions/cleanroom/fix_kwargs.rb +116 -0
  60. data/lib/hybrid_platforms_conductor/core_extensions/symbol/zero.rb +24 -0
  61. data/lib/hybrid_platforms_conductor/credentials.rb +39 -36
  62. data/lib/hybrid_platforms_conductor/current_dir_monitor.rb +4 -1
  63. data/lib/hybrid_platforms_conductor/deployer.rb +275 -224
  64. data/lib/hybrid_platforms_conductor/executable.rb +20 -15
  65. data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/config.rb +10 -7
  66. data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/host_ip.rb +1 -1
  67. data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/host_keys.rb +2 -2
  68. data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/platform_handlers.rb +4 -4
  69. data/lib/hybrid_platforms_conductor/hpc_plugins/connector/local.rb +2 -0
  70. data/lib/hybrid_platforms_conductor/hpc_plugins/connector/ssh.rb +45 -49
  71. data/lib/hybrid_platforms_conductor/hpc_plugins/log/my_log_plugin.rb.sample +100 -0
  72. data/lib/hybrid_platforms_conductor/hpc_plugins/log/remote_fs.rb +180 -0
  73. data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/serverless_chef.rb +68 -66
  74. data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/serverless_chef/dsl_parser.rb +13 -0
  75. data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/serverless_chef/recipes_tree_builder.rb +39 -38
  76. data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/yaml_inventory.rb +5 -4
  77. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/docker.rb +43 -45
  78. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/podman.rb +18 -20
  79. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox.rb +118 -117
  80. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox/proxmox_waiter.rb +39 -43
  81. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox/reserve_proxmox_container +9 -13
  82. data/lib/hybrid_platforms_conductor/hpc_plugins/report/confluence.rb +2 -2
  83. data/lib/hybrid_platforms_conductor/hpc_plugins/report/mediawiki.rb +28 -21
  84. data/lib/hybrid_platforms_conductor/hpc_plugins/report/stdout.rb +26 -22
  85. data/lib/hybrid_platforms_conductor/hpc_plugins/secrets_reader/cli.rb +77 -0
  86. data/lib/hybrid_platforms_conductor/hpc_plugins/secrets_reader/my_secrets_reader_plugin.rb.sample +46 -0
  87. data/lib/hybrid_platforms_conductor/hpc_plugins/secrets_reader/thycotic.rb +90 -0
  88. data/lib/hybrid_platforms_conductor/hpc_plugins/test/bitbucket_conf.rb +3 -3
  89. data/lib/hybrid_platforms_conductor/hpc_plugins/test/check_deploy_and_idempotence.rb +4 -2
  90. data/lib/hybrid_platforms_conductor/hpc_plugins/test/connection.rb +3 -1
  91. data/lib/hybrid_platforms_conductor/hpc_plugins/test/deploy_freshness.rb +7 -21
  92. data/lib/hybrid_platforms_conductor/hpc_plugins/test/deploy_removes_root_access.rb +21 -19
  93. data/lib/hybrid_platforms_conductor/hpc_plugins/test/divergence.rb +2 -2
  94. data/lib/hybrid_platforms_conductor/hpc_plugins/test/executables.rb +2 -2
  95. data/lib/hybrid_platforms_conductor/hpc_plugins/test/file_system.rb +21 -22
  96. data/lib/hybrid_platforms_conductor/hpc_plugins/test/file_system_hdfs.rb +19 -21
  97. data/lib/hybrid_platforms_conductor/hpc_plugins/test/github_ci.rb +2 -3
  98. data/lib/hybrid_platforms_conductor/hpc_plugins/test/hostname.rb +3 -1
  99. data/lib/hybrid_platforms_conductor/hpc_plugins/test/idempotence.rb +2 -2
  100. data/lib/hybrid_platforms_conductor/hpc_plugins/test/ip.rb +4 -2
  101. data/lib/hybrid_platforms_conductor/hpc_plugins/test/jenkins_ci_conf.rb +21 -22
  102. data/lib/hybrid_platforms_conductor/hpc_plugins/test/jenkins_ci_masters_ok.rb +10 -12
  103. data/lib/hybrid_platforms_conductor/hpc_plugins/test/linear_strategy.rb +9 -9
  104. data/lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb +5 -3
  105. data/lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb +5 -3
  106. data/lib/hybrid_platforms_conductor/hpc_plugins/test/orphan_files.rb +13 -10
  107. data/lib/hybrid_platforms_conductor/hpc_plugins/test/ports.rb +5 -3
  108. data/lib/hybrid_platforms_conductor/hpc_plugins/test/private_ips.rb +5 -5
  109. data/lib/hybrid_platforms_conductor/hpc_plugins/test/public_ips.rb +5 -5
  110. data/lib/hybrid_platforms_conductor/hpc_plugins/test/spectre.rb +7 -7
  111. data/lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb +3 -3
  112. data/lib/hybrid_platforms_conductor/hpc_plugins/test/vulnerabilities.rb +27 -25
  113. data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/confluence.rb +2 -2
  114. data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/stdout.rb +8 -6
  115. data/lib/hybrid_platforms_conductor/io_router.rb +14 -13
  116. data/lib/hybrid_platforms_conductor/json_dumper.rb +2 -2
  117. data/lib/hybrid_platforms_conductor/log.rb +31 -0
  118. data/lib/hybrid_platforms_conductor/logger_helpers.rb +19 -16
  119. data/lib/hybrid_platforms_conductor/nodes_handler.rb +89 -71
  120. data/lib/hybrid_platforms_conductor/parallel_threads.rb +7 -11
  121. data/lib/hybrid_platforms_conductor/platform_handler.rb +7 -7
  122. data/lib/hybrid_platforms_conductor/platforms_handler.rb +5 -3
  123. data/lib/hybrid_platforms_conductor/plugin.rb +2 -2
  124. data/lib/hybrid_platforms_conductor/plugins.rb +14 -8
  125. data/lib/hybrid_platforms_conductor/provisioner.rb +4 -4
  126. data/lib/hybrid_platforms_conductor/report.rb +2 -2
  127. data/lib/hybrid_platforms_conductor/reports_handler.rb +3 -2
  128. data/lib/hybrid_platforms_conductor/secrets_reader.rb +31 -0
  129. data/lib/hybrid_platforms_conductor/services_handler.rb +32 -29
  130. data/lib/hybrid_platforms_conductor/test_only_remote_node.rb +18 -0
  131. data/lib/hybrid_platforms_conductor/test_report.rb +15 -18
  132. data/lib/hybrid_platforms_conductor/tests_runner.rb +116 -118
  133. data/lib/hybrid_platforms_conductor/thycotic.rb +28 -19
  134. data/lib/hybrid_platforms_conductor/topographer.rb +200 -190
  135. data/lib/hybrid_platforms_conductor/topographer/plugins/graphviz.rb +8 -8
  136. data/lib/hybrid_platforms_conductor/topographer/plugins/json.rb +4 -4
  137. data/lib/hybrid_platforms_conductor/version.rb +1 -1
  138. data/spec/hybrid_platforms_conductor_test.rb +33 -12
  139. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/bash_spec.rb +18 -11
  140. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/interactive_spec.rb +2 -2
  141. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/remote_bash_spec.rb +32 -21
  142. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/ruby_spec.rb +75 -49
  143. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/scp_spec.rb +27 -15
  144. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions_spec.rb +90 -59
  145. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connection_spec.rb +46 -44
  146. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/local/connectable_nodes_spec.rb +12 -8
  147. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/local/remote_actions_spec.rb +4 -7
  148. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/cli_options_spec.rb +21 -22
  149. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/config_dsl_spec.rb +23 -24
  150. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/connectable_nodes_spec.rb +10 -6
  151. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/connections_spec.rb +106 -75
  152. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/global_helpers_spec.rb +145 -126
  153. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb +3 -3
  154. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/remote_actions_spec.rb +29 -25
  155. data/spec/hybrid_platforms_conductor_test/api/actions_executor/logging_spec.rb +167 -142
  156. data/spec/hybrid_platforms_conductor_test/api/actions_executor/parallel_spec.rb +272 -244
  157. data/spec/hybrid_platforms_conductor_test/api/actions_executor/timeout_spec.rb +16 -16
  158. data/spec/hybrid_platforms_conductor_test/api/cmd_runner_spec.rb +36 -36
  159. data/spec/hybrid_platforms_conductor_test/api/config_spec.rb +24 -22
  160. data/spec/hybrid_platforms_conductor_test/api/deployer/check_spec.rb +4 -2
  161. data/spec/hybrid_platforms_conductor_test/api/deployer/config_dsl_spec.rb +43 -5
  162. data/spec/hybrid_platforms_conductor_test/api/deployer/deploy_spec.rb +199 -216
  163. data/spec/hybrid_platforms_conductor_test/api/deployer/log_plugins/remote_fs_spec.rb +223 -0
  164. data/spec/hybrid_platforms_conductor_test/api/deployer/parse_deploy_output_spec.rb +55 -59
  165. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioner_spec.rb +36 -62
  166. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/podman_spec.rb +17 -17
  167. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/config_dsl_spec.rb +4 -4
  168. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/create_spec.rb +44 -51
  169. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/destroy_spec.rb +3 -3
  170. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/ip_spec.rb +12 -16
  171. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/destroy_vm_spec.rb +31 -19
  172. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/expired_containers_spec.rb +324 -266
  173. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/ips_assignment_spec.rb +89 -61
  174. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/other_lxc_containers_resources_spec.rb +117 -93
  175. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/pve_node_resources_spec.rb +71 -54
  176. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/retries_spec.rb +10 -8
  177. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/vm_ids_assignment_spec.rb +80 -60
  178. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/start_spec.rb +1 -1
  179. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/state_spec.rb +1 -1
  180. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/stop_spec.rb +1 -1
  181. data/spec/hybrid_platforms_conductor_test/api/deployer/secrets_reader_plugins/cli_spec.rb +64 -0
  182. data/spec/hybrid_platforms_conductor_test/api/deployer/secrets_reader_plugins/thycotic_spec.rb +268 -0
  183. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs/config_spec.rb +8 -10
  184. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs/host_ip_spec.rb +33 -24
  185. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs/host_keys_spec.rb +64 -51
  186. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs/platform_handlers_spec.rb +3 -3
  187. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs_plugins_api_spec.rb +50 -51
  188. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/common_spec.rb +91 -81
  189. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/config_dsl_spec.rb +14 -16
  190. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/git_diff_impacts_spec.rb +51 -75
  191. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/nodes_selectors_spec.rb +35 -26
  192. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/platform_handlers_plugins_api_spec.rb +24 -16
  193. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/several_platforms_spec.rb +29 -19
  194. data/spec/hybrid_platforms_conductor_test/api/platform_handler_spec.rb +4 -4
  195. data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/config_dsl_spec.rb +2 -2
  196. data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/deploy_output_parsing_spec.rb +6 -6
  197. data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/diff_impacts_spec.rb +57 -99
  198. data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/inventory_spec.rb +4 -4
  199. data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/packaging_spec.rb +32 -35
  200. data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/services_deployment_spec.rb +10 -10
  201. data/spec/hybrid_platforms_conductor_test/api/platforms_handler_spec.rb +38 -27
  202. data/spec/hybrid_platforms_conductor_test/api/plugins_spec.rb +46 -52
  203. data/spec/hybrid_platforms_conductor_test/api/reports_handler_spec.rb +2 -2
  204. data/spec/hybrid_platforms_conductor_test/api/services_handler/actions_to_deploy_spec.rb +90 -58
  205. data/spec/hybrid_platforms_conductor_test/api/services_handler/deploy_allowed_spec.rb +38 -34
  206. data/spec/hybrid_platforms_conductor_test/api/services_handler/log_info_spec.rb +11 -9
  207. data/spec/hybrid_platforms_conductor_test/api/services_handler/package_spec.rb +193 -171
  208. data/spec/hybrid_platforms_conductor_test/api/services_handler/parse_deploy_output_spec.rb +66 -54
  209. data/spec/hybrid_platforms_conductor_test/api/services_handler/prepare_for_deploy_spec.rb +147 -133
  210. data/spec/hybrid_platforms_conductor_test/api/tests_runner/common_spec.rb +69 -49
  211. data/spec/hybrid_platforms_conductor_test/api/tests_runner/global_spec.rb +5 -4
  212. data/spec/hybrid_platforms_conductor_test/api/tests_runner/node_check_spec.rb +8 -5
  213. data/spec/hybrid_platforms_conductor_test/api/tests_runner/node_spec.rb +8 -5
  214. data/spec/hybrid_platforms_conductor_test/api/tests_runner/node_ssh_spec.rb +30 -27
  215. data/spec/hybrid_platforms_conductor_test/api/tests_runner/platform_spec.rb +12 -9
  216. data/spec/hybrid_platforms_conductor_test/api/tests_runner/reports_spec.rb +48 -47
  217. data/spec/hybrid_platforms_conductor_test/api/tests_runner/test_plugins/bitbucket_conf_spec.rb +5 -5
  218. data/spec/hybrid_platforms_conductor_test/api/tests_runner/test_plugins/github_ci_spec.rb +5 -5
  219. data/spec/hybrid_platforms_conductor_test/api/tests_runner/test_reports_plugins/confluence_spec.rb +5 -5
  220. data/spec/hybrid_platforms_conductor_test/cmdb_plugins/test_cmdb.rb +9 -9
  221. data/spec/hybrid_platforms_conductor_test/cmdb_plugins/{test_cmdb2.rb → test_cmdb_2.rb} +6 -6
  222. data/spec/hybrid_platforms_conductor_test/cmdb_plugins/test_cmdb_others.rb +3 -3
  223. data/spec/hybrid_platforms_conductor_test/cmdb_plugins/{test_cmdb_others2.rb → test_cmdb_others_2.rb} +2 -2
  224. data/spec/hybrid_platforms_conductor_test/docs_spec.rb +1 -1
  225. data/spec/hybrid_platforms_conductor_test/executables/{check-node_spec.rb → check_node_spec.rb} +4 -6
  226. data/spec/hybrid_platforms_conductor_test/executables/deploy_spec.rb +4 -6
  227. data/spec/hybrid_platforms_conductor_test/executables/get_impacted_nodes_spec.rb +76 -77
  228. data/spec/hybrid_platforms_conductor_test/executables/last_deploys_spec.rb +159 -113
  229. data/spec/hybrid_platforms_conductor_test/executables/nodes_to_deploy_spec.rb +299 -160
  230. data/spec/hybrid_platforms_conductor_test/executables/options/actions_executor_spec.rb +4 -6
  231. data/spec/hybrid_platforms_conductor_test/executables/options/cmd_runner_spec.rb +3 -5
  232. data/spec/hybrid_platforms_conductor_test/executables/options/common_spec.rb +8 -8
  233. data/spec/hybrid_platforms_conductor_test/executables/options/deployer_spec.rb +12 -196
  234. data/spec/hybrid_platforms_conductor_test/executables/options/nodes_handler_spec.rb +9 -10
  235. data/spec/hybrid_platforms_conductor_test/executables/options/nodes_selectors_spec.rb +9 -10
  236. data/spec/hybrid_platforms_conductor_test/executables/options/reports_handler_spec.rb +1 -1
  237. data/spec/hybrid_platforms_conductor_test/executables/options/tests_runner_spec.rb +22 -22
  238. data/spec/hybrid_platforms_conductor_test/executables/report_spec.rb +22 -16
  239. data/spec/hybrid_platforms_conductor_test/executables/run_spec.rb +32 -32
  240. data/spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb +7 -9
  241. data/spec/hybrid_platforms_conductor_test/executables/test_spec.rb +3 -5
  242. data/spec/hybrid_platforms_conductor_test/helpers/actions_executor_helpers.rb +2 -2
  243. data/spec/hybrid_platforms_conductor_test/helpers/cmd_runner_helpers.rb +4 -3
  244. data/spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb +2 -2
  245. data/spec/hybrid_platforms_conductor_test/helpers/config_helpers.rb +1 -1
  246. data/spec/hybrid_platforms_conductor_test/helpers/connector_ssh_helpers.rb +12 -13
  247. data/spec/hybrid_platforms_conductor_test/helpers/deployer_helpers.rb +245 -56
  248. data/spec/hybrid_platforms_conductor_test/helpers/executables_helpers.rb +11 -11
  249. data/spec/hybrid_platforms_conductor_test/helpers/nodes_handler_helpers.rb +1 -1
  250. data/spec/hybrid_platforms_conductor_test/helpers/platforms_handler_helpers.rb +39 -28
  251. data/spec/hybrid_platforms_conductor_test/helpers/plugins_helpers.rb +1 -1
  252. data/spec/hybrid_platforms_conductor_test/helpers/provisioner_proxmox_helpers.rb +86 -111
  253. data/spec/hybrid_platforms_conductor_test/helpers/reports_handler_helpers.rb +1 -1
  254. data/spec/hybrid_platforms_conductor_test/helpers/serverless_chef_helpers.rb +3 -3
  255. data/spec/hybrid_platforms_conductor_test/helpers/services_handler_helpers.rb +1 -1
  256. data/spec/hybrid_platforms_conductor_test/helpers/tests_runner_helpers.rb +1 -1
  257. data/spec/hybrid_platforms_conductor_test/mocked_lib/my_test_gem/hpc_plugins/test_plugin_type/{test_plugin_id1.rb → test_plugin_id_1.rb} +0 -0
  258. data/spec/hybrid_platforms_conductor_test/mocked_lib/my_test_gem/hpc_plugins/test_plugin_type/{test_plugin_id2.rb → test_plugin_id_2.rb} +0 -0
  259. data/spec/hybrid_platforms_conductor_test/mocked_lib/my_test_gem2/sub_dir/hpc_plugins/test_plugin_type/{test_plugin_id3.rb → test_plugin_id_3.rb} +0 -0
  260. data/spec/hybrid_platforms_conductor_test/mocked_lib/my_test_gem2/sub_dir/hpc_plugins/{test_plugin_type2/test_plugin_id4.rb → test_plugin_type_2/test_plugin_id_4.rb} +0 -0
  261. data/spec/hybrid_platforms_conductor_test/platform_handler_plugins/test.rb +1 -1
  262. data/spec/hybrid_platforms_conductor_test/platform_handler_plugins/{test2.rb → test_2.rb} +0 -0
  263. data/spec/hybrid_platforms_conductor_test/rubocop_spec.rb +31 -0
  264. data/spec/hybrid_platforms_conductor_test/serverless_chef_repositories/1_node/nodes/node.json +3 -3
  265. data/spec/hybrid_platforms_conductor_test/serverless_chef_repositories/data_bags/nodes/node.json +3 -3
  266. data/spec/hybrid_platforms_conductor_test/serverless_chef_repositories/recipes/cookbooks/test_cookbook_2/libraries/default.rb +1 -0
  267. data/spec/hybrid_platforms_conductor_test/serverless_chef_repositories/several_cookbooks/other_cookbooks/test_cookbook_2/libraries/default.rb +1 -0
  268. data/spec/hybrid_platforms_conductor_test/shared_examples/deployer.rb +952 -0
  269. data/spec/hybrid_platforms_conductor_test/test_connector.rb +3 -3
  270. data/spec/hybrid_platforms_conductor_test/test_log_no_read_plugin.rb +84 -0
  271. data/spec/hybrid_platforms_conductor_test/test_log_plugin.rb +105 -0
  272. data/spec/hybrid_platforms_conductor_test/test_plugins/global.rb +1 -0
  273. data/spec/hybrid_platforms_conductor_test/test_plugins/node.rb +1 -0
  274. data/spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb +1 -0
  275. data/spec/hybrid_platforms_conductor_test/test_plugins/platform.rb +1 -0
  276. data/spec/hybrid_platforms_conductor_test/test_plugins/several_checks.rb +2 -2
  277. data/spec/hybrid_platforms_conductor_test/test_secrets_reader_plugin.rb +45 -0
  278. data/spec/hybrid_platforms_conductor_test/tests_report_plugin.rb +5 -6
  279. data/spec/spec_helper.rb +17 -18
  280. data/tools/check_md +16 -20
  281. data/tools/generate_mermaid +1 -1
  282. metadata +195 -144
  283. data/spec/hybrid_platforms_conductor_test/helpers/deployer_test_helpers.rb +0 -916
@@ -1,8 +1,25 @@
1
+ # Specific test registered by the test platform handler
2
+ class SpecificPlatformHandlerTest < HybridPlatformsConductor::Test
3
+
4
+ class << self
5
+
6
+ attr_accessor :run
7
+
8
+ end
9
+ @run = false
10
+
11
+ def test
12
+ SpecificPlatformHandlerTest.run = true
13
+ end
14
+
15
+ end
16
+
1
17
  describe HybridPlatformsConductor::TestsRunner do
2
18
 
3
19
  it 'executes all tests when no test is selected' do
4
- with_test_platform do
5
- register_test_plugins(test_tests_runner,
20
+ with_test_platform({}) do
21
+ register_test_plugins(
22
+ test_tests_runner,
6
23
  global_test: HybridPlatformsConductorTest::TestPlugins::Global,
7
24
  global_test_2: HybridPlatformsConductorTest::TestPlugins::Global
8
25
  )
@@ -12,8 +29,9 @@ describe HybridPlatformsConductor::TestsRunner do
12
29
  end
13
30
 
14
31
  it 'executes all tests when all tests are selected' do
15
- with_test_platform do
16
- register_test_plugins(test_tests_runner,
32
+ with_test_platform({}) do
33
+ register_test_plugins(
34
+ test_tests_runner,
17
35
  global_test: HybridPlatformsConductorTest::TestPlugins::Global,
18
36
  global_test_2: HybridPlatformsConductorTest::TestPlugins::Global
19
37
  )
@@ -24,7 +42,7 @@ describe HybridPlatformsConductor::TestsRunner do
24
42
  end
25
43
 
26
44
  it 'returns 1 when tests are failing' do
27
- with_test_platform do
45
+ with_test_platform({}) do
28
46
  register_test_plugins(test_tests_runner, global_test: HybridPlatformsConductorTest::TestPlugins::Global)
29
47
  HybridPlatformsConductorTest::TestPlugins::Global.fail = true
30
48
  expect(test_tests_runner.run_tests([])).to eq 1
@@ -33,9 +51,12 @@ describe HybridPlatformsConductor::TestsRunner do
33
51
  end
34
52
 
35
53
  it 'returns 0 when tests are failing as expected' do
36
- with_test_platform({}, false, '
37
- expect_tests_to_fail(:platform_test, \'Expected failure\')
38
- ') do
54
+ with_test_platform(
55
+ {},
56
+ additional_config: <<~'EO_CONFIG'
57
+ expect_tests_to_fail(:platform_test, 'Expected failure')
58
+ EO_CONFIG
59
+ ) do
39
60
  register_test_plugins(test_tests_runner, platform_test: HybridPlatformsConductorTest::TestPlugins::Platform)
40
61
  HybridPlatformsConductorTest::TestPlugins::Platform.fail_for = ['platform']
41
62
  expect(test_tests_runner.run_tests([])).to eq 0
@@ -44,11 +65,14 @@ describe HybridPlatformsConductor::TestsRunner do
44
65
  end
45
66
 
46
67
  it 'returns 0 when tests are failing as expected on a given node' do
47
- with_test_platform({ nodes: { 'node1' => {}, 'node2' => {}, 'node3' => {} } }, false, '
48
- for_nodes(\'node2\') do
49
- expect_tests_to_fail(:node_test, \'Expected failure\')
50
- end
51
- ') do
68
+ with_test_platform(
69
+ { nodes: { 'node1' => {}, 'node2' => {}, 'node3' => {} } },
70
+ additional_config: <<~'EO_CONFIG'
71
+ for_nodes('node2') do
72
+ expect_tests_to_fail(:node_test, 'Expected failure')
73
+ end
74
+ EO_CONFIG
75
+ ) do
52
76
  register_test_plugins(test_tests_runner, node_test: HybridPlatformsConductorTest::TestPlugins::Node)
53
77
  HybridPlatformsConductorTest::TestPlugins::Node.fail_for = { node_test: ['node2'] }
54
78
  expect(test_tests_runner.run_tests(%w[node1 node2 node3])).to eq 0
@@ -57,9 +81,12 @@ describe HybridPlatformsConductor::TestsRunner do
57
81
  end
58
82
 
59
83
  it 'returns 1 when tests are succeeding but were expected to fail' do
60
- with_test_platform({}, false, '
61
- expect_tests_to_fail(:platform_test, \'Expected failure\')
62
- ') do
84
+ with_test_platform(
85
+ {},
86
+ additional_config: <<~'EO_CONFIG'
87
+ expect_tests_to_fail(:platform_test, 'Expected failure')
88
+ EO_CONFIG
89
+ ) do
63
90
  register_test_plugins(test_tests_runner, platform_test: HybridPlatformsConductorTest::TestPlugins::Platform)
64
91
  expect(test_tests_runner.run_tests([])).to eq 1
65
92
  expect(HybridPlatformsConductorTest::TestPlugins::Platform.runs).to eq [[:platform_test, 'platform']]
@@ -67,11 +94,14 @@ describe HybridPlatformsConductor::TestsRunner do
67
94
  end
68
95
 
69
96
  it 'returns 1 when extra expected failures have not been tested when running all tests' do
70
- with_test_platform({ nodes: { 'another_node' => {} } }, false, '
71
- for_nodes(\'another_node\') do
72
- expect_tests_to_fail(:platform_test, \'Expected failure\')
73
- end
74
- ') do
97
+ with_test_platform(
98
+ { nodes: { 'another_node' => {} } },
99
+ additional_config: <<~'EO_CONFIG'
100
+ for_nodes('another_node') do
101
+ expect_tests_to_fail(:platform_test, 'Expected failure')
102
+ end
103
+ EO_CONFIG
104
+ ) do
75
105
  register_test_plugins(test_tests_runner, platform_test: HybridPlatformsConductorTest::TestPlugins::Platform)
76
106
  expect(test_tests_runner.run_tests([])).to eq 1
77
107
  expect(HybridPlatformsConductorTest::TestPlugins::Platform.runs).to eq [[:platform_test, 'platform']]
@@ -79,11 +109,13 @@ describe HybridPlatformsConductor::TestsRunner do
79
109
  end
80
110
 
81
111
  it 'fails when expected failures reference missing nodes' do
82
- with_test_platform({ nodes: { 'node' => {} } }, false, '
83
- for_nodes(\'missing_node\') do
84
- expect_tests_to_fail(:node_test, \'Expected failure\')
112
+ with_test_platform(
113
+ { nodes: { 'node' => {} } },
114
+ additional_config: <<~'EO_CONFIG'
115
+ for_nodes('missing_node') do
116
+ expect_tests_to_fail(:node_test, 'Expected failure')
85
117
  end
86
- '
118
+ EO_CONFIG
87
119
  ) do
88
120
  register_test_plugins(test_tests_runner, node_test: HybridPlatformsConductorTest::TestPlugins::Node)
89
121
  expect { test_tests_runner.run_tests([{ all: true }]) }.to raise_error 'Unknown nodes: missing_node'
@@ -91,7 +123,7 @@ describe HybridPlatformsConductor::TestsRunner do
91
123
  end
92
124
 
93
125
  it 'fails when we ask for an unknown test' do
94
- with_test_platform do
126
+ with_test_platform({}) do
95
127
  register_test_plugins(test_tests_runner, global_test: HybridPlatformsConductorTest::TestPlugins::Global)
96
128
  test_tests_runner.tests = [:global_test_2]
97
129
  expect { test_tests_runner.run_tests([]) }.to raise_error(RuntimeError, 'Unknown test names: global_test_2')
@@ -100,8 +132,10 @@ describe HybridPlatformsConductor::TestsRunner do
100
132
 
101
133
  it 'executes different tests levels if 1 plugin defines them' do
102
134
  with_test_platforms(
103
- 'platform1' => { nodes: { 'node11' => {}, 'node12' => {} } },
104
- 'platform2' => { nodes: { 'node21' => {}, 'node22' => {} } }
135
+ {
136
+ 'platform1' => { nodes: { 'node11' => {}, 'node12' => {} } },
137
+ 'platform2' => { nodes: { 'node21' => {}, 'node22' => {} } }
138
+ }
105
139
  ) do
106
140
  register_test_plugins(test_tests_runner, several_tests: HybridPlatformsConductorTest::TestPlugins::SeveralChecks)
107
141
  # Mock the Actions Executor and Deployer expected calls
@@ -128,23 +162,23 @@ describe HybridPlatformsConductor::TestsRunner do
128
162
  'echo "$?"'
129
163
  ]
130
164
  end
131
- Hash[node_suffixes.map do |node_suffix|
165
+ node_suffixes.map do |node_suffix|
132
166
  [
133
167
  "node#{node_suffix}",
134
168
  [
135
169
  0,
136
- <<~EOS,
170
+ <<~EO_STDOUT,
137
171
  ===== TEST COMMAND EXECUTION ===== Separator generated by Hybrid Platforms Conductor test framework =====
138
172
  stdout#{node_suffix}
139
173
  0
140
- EOS
141
- <<~EOS
174
+ EO_STDOUT
175
+ <<~EO_STDERR
142
176
  ===== TEST COMMAND EXECUTION ===== Separator generated by Hybrid Platforms Conductor test framework =====
143
177
  stderr#{node_suffix}
144
- EOS
178
+ EO_STDERR
145
179
  ]
146
180
  ]
147
- end]
181
+ end.to_h
148
182
  end])
149
183
  # Run everything
150
184
  test_tests_runner.tests = [:several_tests]
@@ -169,22 +203,8 @@ describe HybridPlatformsConductor::TestsRunner do
169
203
  end
170
204
  end
171
205
 
172
- # Specific test registered by the test platform handler
173
- class SpecificPlatformHandlerTest < HybridPlatformsConductor::Test
174
-
175
- class << self
176
- attr_accessor :run
177
- end
178
- @run = false
179
-
180
- def test
181
- SpecificPlatformHandlerTest.run = true
182
- end
183
-
184
- end
185
-
186
206
  it 'executes tests defined by a platform handler' do
187
- with_test_platform(tests: { specific_platform_handler_test: SpecificPlatformHandlerTest }) do
207
+ with_test_platform({ tests: { specific_platform_handler_test: SpecificPlatformHandlerTest } }) do
188
208
  test_tests_runner.tests = [:specific_platform_handler_test]
189
209
  expect(test_tests_runner.run_tests([])).to eq 0
190
210
  expect(SpecificPlatformHandlerTest.run).to eq true
@@ -1,14 +1,15 @@
1
1
  describe HybridPlatformsConductor::TestsRunner do
2
2
 
3
- context 'checking global tests execution' do
3
+ context 'when checking global tests execution' do
4
4
 
5
5
  # Prepare the test platform with test plugins
6
6
  #
7
7
  # Parameters::
8
- # * *platforms_info* (Hash): The platofrms info [default: {}]
8
+ # * *platforms_info* (Hash): The platforms info [default: {}]
9
9
  def with_test_platform_for_global_tests(platforms_info: {})
10
10
  with_test_platform(platforms_info) do
11
- register_test_plugins(test_tests_runner,
11
+ register_test_plugins(
12
+ test_tests_runner,
12
13
  global_test: HybridPlatformsConductorTest::TestPlugins::Global,
13
14
  global_test_2: HybridPlatformsConductorTest::TestPlugins::Global
14
15
  )
@@ -26,7 +27,7 @@ describe HybridPlatformsConductor::TestsRunner do
26
27
 
27
28
  it 'executes several global tests' do
28
29
  with_test_platform_for_global_tests do
29
- test_tests_runner.tests = [:global_test, :global_test_2]
30
+ test_tests_runner.tests = %i[global_test global_test_2]
30
31
  expect(test_tests_runner.run_tests([])).to eq 0
31
32
  expect(HybridPlatformsConductorTest::TestPlugins::Global.nbr_runs).to eq 2
32
33
  end
@@ -1,6 +1,6 @@
1
1
  describe HybridPlatformsConductor::TestsRunner do
2
2
 
3
- context 'checking node tests on check-node results' do
3
+ context 'when checking node tests on check-node results' do
4
4
 
5
5
  # Prepare the test platform with test plugins
6
6
  #
@@ -8,10 +8,13 @@ describe HybridPlatformsConductor::TestsRunner do
8
8
  # * Proc: Code called with the platform setup
9
9
  def with_test_platform_for_node_check_tests
10
10
  with_test_platforms(
11
- 'platform1' => { nodes: { 'node11' => {}, 'node12' => {} } },
12
- 'platform2' => { nodes: { 'node21' => {}, 'node22' => {} }, platform_type: :test2 }
11
+ {
12
+ 'platform1' => { nodes: { 'node11' => {}, 'node12' => {} } },
13
+ 'platform2' => { nodes: { 'node21' => {}, 'node22' => {} }, platform_type: :test_2 }
14
+ }
13
15
  ) do
14
- register_test_plugins(test_tests_runner,
16
+ register_test_plugins(
17
+ test_tests_runner,
15
18
  node_check_test: HybridPlatformsConductorTest::TestPlugins::NodeCheck,
16
19
  node_check_test_2: HybridPlatformsConductorTest::TestPlugins::NodeCheck
17
20
  )
@@ -61,7 +64,7 @@ describe HybridPlatformsConductor::TestsRunner do
61
64
 
62
65
  it 'executes check node tests once per node even if there are several tests using check reports' do
63
66
  with_test_platform_for_node_check_tests do
64
- test_tests_runner.tests = [:node_check_test, :node_check_test_2]
67
+ test_tests_runner.tests = %i[node_check_test node_check_test_2]
65
68
  expect(test_deployer).to receive(:deploy_on).with(%w[node11 node12 node21 node22]).once do
66
69
  expect(test_deployer.use_why_run).to eq true
67
70
  {
@@ -1,6 +1,6 @@
1
1
  describe HybridPlatformsConductor::TestsRunner do
2
2
 
3
- context 'checking node tests execution' do
3
+ context 'when checking node tests execution' do
4
4
 
5
5
  # Prepare the test platform with test plugins
6
6
  #
@@ -8,10 +8,13 @@ describe HybridPlatformsConductor::TestsRunner do
8
8
  # * Proc: Code called with the platform setup
9
9
  def with_test_platform_for_node_tests
10
10
  with_test_platforms(
11
- 'platform1' => { nodes: { 'node11' => {}, 'node12' => {}, 'node13' => {} } },
12
- 'platform2' => { nodes: { 'node21' => {}, 'node22' => {}, 'node23' => {} }, platform_type: :test2 }
11
+ {
12
+ 'platform1' => { nodes: { 'node11' => {}, 'node12' => {}, 'node13' => {} } },
13
+ 'platform2' => { nodes: { 'node21' => {}, 'node22' => {}, 'node23' => {} }, platform_type: :test_2 }
14
+ }
13
15
  ) do
14
- register_test_plugins(test_tests_runner,
16
+ register_test_plugins(
17
+ test_tests_runner,
15
18
  node_test: HybridPlatformsConductorTest::TestPlugins::Node,
16
19
  node_test_2: HybridPlatformsConductorTest::TestPlugins::Node
17
20
  )
@@ -47,7 +50,7 @@ describe HybridPlatformsConductor::TestsRunner do
47
50
 
48
51
  it 'executes several node tests' do
49
52
  with_test_platform_for_node_tests do
50
- test_tests_runner.tests = [:node_test, :node_test_2]
53
+ test_tests_runner.tests = %i[node_test node_test_2]
51
54
  expect(test_tests_runner.run_tests([{ all: true }])).to eq 0
52
55
  expect(HybridPlatformsConductorTest::TestPlugins::Node.runs.sort).to eq [
53
56
  [:node_test, 'node11'],
@@ -1,6 +1,6 @@
1
1
  describe HybridPlatformsConductor::TestsRunner do
2
2
 
3
- context 'checking connection node tests execution' do
3
+ context 'when checking connection node tests execution' do
4
4
 
5
5
  # Prepare the test platform with test plugins
6
6
  #
@@ -8,10 +8,13 @@ describe HybridPlatformsConductor::TestsRunner do
8
8
  # * Proc: Code called with the platform setup
9
9
  def with_test_platform_for_node_connection_tests
10
10
  with_test_platforms(
11
- 'platform1' => { nodes: { 'node11' => {}, 'node12' => {} } },
12
- 'platform2' => { nodes: { 'node21' => {}, 'node22' => {} }, platform_type: :test2 }
11
+ {
12
+ 'platform1' => { nodes: { 'node11' => {}, 'node12' => {} } },
13
+ 'platform2' => { nodes: { 'node21' => {}, 'node22' => {} }, platform_type: :test_2 }
14
+ }
13
15
  ) do
14
- register_test_plugins(test_tests_runner,
16
+ register_test_plugins(
17
+ test_tests_runner,
15
18
  node_ssh_test: HybridPlatformsConductorTest::TestPlugins::NodeSsh,
16
19
  node_ssh_test_2: HybridPlatformsConductorTest::TestPlugins::NodeSsh
17
20
  )
@@ -40,23 +43,23 @@ describe HybridPlatformsConductor::TestsRunner do
40
43
  'echo "$?"'
41
44
  ]
42
45
  end
43
- Hash[node_suffixes.map do |node_suffix|
46
+ node_suffixes.map do |node_suffix|
44
47
  [
45
48
  "node#{node_suffix}",
46
49
  [
47
50
  0,
48
- <<~EOS,
51
+ <<~EO_STDOUT,
49
52
  ===== TEST COMMAND EXECUTION ===== Separator generated by Hybrid Platforms Conductor test framework =====
50
53
  stdout#{node_suffix}
51
54
  #{fails_on.include?(node_suffix) ? 1 : 0}
52
- EOS
53
- <<~EOS,
55
+ EO_STDOUT
56
+ <<~EO_STDERR
54
57
  ===== TEST COMMAND EXECUTION ===== Separator generated by Hybrid Platforms Conductor test framework =====
55
58
  stderr#{node_suffix}
56
- EOS
59
+ EO_STDERR
57
60
  ]
58
61
  ]
59
- end]
62
+ end.to_h
60
63
  end
61
64
 
62
65
  it 'executes SSH node tests once per node with the correct command' do
@@ -126,34 +129,34 @@ describe HybridPlatformsConductor::TestsRunner do
126
129
  'echo "$?"',
127
130
  'echo \'===== TEST COMMAND EXECUTION ===== Separator generated by Hybrid Platforms Conductor test framework =====\'',
128
131
  '>&2 echo \'===== TEST COMMAND EXECUTION ===== Separator generated by Hybrid Platforms Conductor test framework =====\'',
129
- "test2_node#{node_suffix}.sh",
132
+ "test_2_node#{node_suffix}.sh",
130
133
  'echo "$?"'
131
134
  ]
132
135
  end
133
- Hash[node_suffixes.map do |node_suffix|
136
+ node_suffixes.map do |node_suffix|
134
137
  [
135
138
  "node#{node_suffix}",
136
139
  [
137
140
  0,
138
- <<~EOS,
141
+ <<~EO_STDOUT,
139
142
  ===== TEST COMMAND EXECUTION ===== Separator generated by Hybrid Platforms Conductor test framework =====
140
143
  stdout#{node_suffix}
141
144
  0
142
145
  ===== TEST COMMAND EXECUTION ===== Separator generated by Hybrid Platforms Conductor test framework =====
143
146
  stdout#{node_suffix}_2
144
147
  0
145
- EOS
146
- <<~EOS
148
+ EO_STDOUT
149
+ <<~EO_STDERR
147
150
  ===== TEST COMMAND EXECUTION ===== Separator generated by Hybrid Platforms Conductor test framework =====
148
151
  stderr#{node_suffix}
149
152
  ===== TEST COMMAND EXECUTION ===== Separator generated by Hybrid Platforms Conductor test framework =====
150
153
  stderr#{node_suffix}_2
151
- EOS
154
+ EO_STDERR
152
155
  ]
153
156
  ]
154
- end]
157
+ end.to_h
155
158
  end])
156
- test_tests_runner.tests = [:node_ssh_test, :node_ssh_test_2]
159
+ test_tests_runner.tests = %i[node_ssh_test node_ssh_test_2]
157
160
  ssh_executions = []
158
161
  HybridPlatformsConductorTest::TestPlugins::NodeSsh.node_tests = {
159
162
  node_ssh_test: {
@@ -163,10 +166,10 @@ describe HybridPlatformsConductor::TestsRunner do
163
166
  'node22' => { 'test_node22.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node22', stdout, stderr, exit_code] } }
164
167
  },
165
168
  node_ssh_test_2: {
166
- 'node11' => { 'test2_node11.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node11', stdout, stderr, exit_code] } },
167
- 'node12' => { 'test2_node12.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node12', stdout, stderr, exit_code] } },
168
- 'node21' => { 'test2_node21.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node21', stdout, stderr, exit_code] } },
169
- 'node22' => { 'test2_node22.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node22', stdout, stderr, exit_code] } }
169
+ 'node11' => { 'test_2_node11.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node11', stdout, stderr, exit_code] } },
170
+ 'node12' => { 'test_2_node12.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node12', stdout, stderr, exit_code] } },
171
+ 'node21' => { 'test_2_node21.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node21', stdout, stderr, exit_code] } },
172
+ 'node22' => { 'test_2_node22.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node22', stdout, stderr, exit_code] } }
170
173
  }
171
174
  }
172
175
  expect(test_tests_runner.run_tests([{ all: true }])).to eq 0
@@ -193,7 +196,7 @@ describe HybridPlatformsConductor::TestsRunner do
193
196
  'node12' => { 'test_node12.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node12', stdout, stderr, exit_code] } },
194
197
  'node21' => { 'test_node21.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node21', stdout, stderr, exit_code] } },
195
198
  'node22' => { 'test_node22.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node22', stdout, stderr, exit_code] } }
196
- }}
199
+ } }
197
200
  expect(test_tests_runner.run_tests([{ all: true }])).to eq 1
198
201
  expect(ssh_executions.sort).to eq [
199
202
  ['node11', ['stdout11'], ['stderr11'], 0],
@@ -211,10 +214,10 @@ describe HybridPlatformsConductor::TestsRunner do
211
214
  ssh_executions = []
212
215
  HybridPlatformsConductorTest::TestPlugins::NodeSsh.node_tests = { node_ssh_test: {
213
216
  'node11' => { 'test_node11.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node11', stdout, stderr, exit_code] } },
214
- 'node12' => { 'test_node12.sh' => proc { |stdout, stderr, exit_code| raise 'Failure on this node' } },
217
+ 'node12' => { 'test_node12.sh' => proc { raise 'Failure on this node' } },
215
218
  'node21' => { 'test_node21.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node21', stdout, stderr, exit_code] } },
216
219
  'node22' => { 'test_node22.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node22', stdout, stderr, exit_code] } }
217
- }}
220
+ } }
218
221
  expect(test_tests_runner.run_tests([{ all: true }])).to eq 1
219
222
  expect(ssh_executions.sort).to eq [
220
223
  ['node11', ['stdout11'], ['stderr11'], 0],
@@ -233,7 +236,7 @@ describe HybridPlatformsConductor::TestsRunner do
233
236
  HybridPlatformsConductorTest::TestPlugins::NodeSsh.node_tests = { node_ssh_test: {
234
237
  'node12' => { 'test_node12.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node12', stdout, stderr, exit_code] } },
235
238
  'node22' => { 'test_node22.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node22', stdout, stderr, exit_code] } }
236
- }}
239
+ } }
237
240
  expect(test_tests_runner.run_tests([{ all: true }])).to eq 0
238
241
  expect(ssh_executions.sort).to eq [
239
242
  ['node12', ['stdout12'], ['stderr12'], 0],
@@ -253,7 +256,7 @@ describe HybridPlatformsConductor::TestsRunner do
253
256
  'node12' => { 'test_node12.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node12', stdout, stderr, exit_code] } },
254
257
  'node21' => { 'test_node21.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node21', stdout, stderr, exit_code] } },
255
258
  'node22' => { 'test_node22.sh' => proc { |stdout, stderr, exit_code| ssh_executions << ['node22', stdout, stderr, exit_code] } }
256
- }}
259
+ } }
257
260
  expect(test_tests_runner.run_tests([{ all: true }])).to eq 0
258
261
  expect(test_tests_runner.max_threads_connection_on_nodes).to eq 43
259
262
  expect(ssh_executions.sort).to eq [