hybrid_platforms_conductor 32.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) hide show
  1. checksums.yaml +7 -0
  2. data/bin/check-node +24 -0
  3. data/bin/deploy +12 -0
  4. data/bin/dump_nodes_json +12 -0
  5. data/bin/free_ips +23 -0
  6. data/bin/free_veids +17 -0
  7. data/bin/get_impacted_nodes +43 -0
  8. data/bin/last_deploys +56 -0
  9. data/bin/nodes_to_deploy +104 -0
  10. data/bin/report +10 -0
  11. data/bin/run +39 -0
  12. data/bin/setup +11 -0
  13. data/bin/ssh_config +14 -0
  14. data/bin/test +13 -0
  15. data/bin/topograph +54 -0
  16. data/lib/hybrid_platforms_conductor/action.rb +82 -0
  17. data/lib/hybrid_platforms_conductor/actions_executor.rb +307 -0
  18. data/lib/hybrid_platforms_conductor/bitbucket.rb +123 -0
  19. data/lib/hybrid_platforms_conductor/cmd_runner.rb +188 -0
  20. data/lib/hybrid_platforms_conductor/cmdb.rb +34 -0
  21. data/lib/hybrid_platforms_conductor/common_config_dsl/bitbucket.rb +78 -0
  22. data/lib/hybrid_platforms_conductor/common_config_dsl/confluence.rb +43 -0
  23. data/lib/hybrid_platforms_conductor/common_config_dsl/file_system_tests.rb +110 -0
  24. data/lib/hybrid_platforms_conductor/common_config_dsl/idempotence_tests.rb +38 -0
  25. data/lib/hybrid_platforms_conductor/config.rb +263 -0
  26. data/lib/hybrid_platforms_conductor/confluence.rb +119 -0
  27. data/lib/hybrid_platforms_conductor/connector.rb +84 -0
  28. data/lib/hybrid_platforms_conductor/credentials.rb +127 -0
  29. data/lib/hybrid_platforms_conductor/current_dir_monitor.rb +42 -0
  30. data/lib/hybrid_platforms_conductor/deployer.rb +598 -0
  31. data/lib/hybrid_platforms_conductor/executable.rb +145 -0
  32. data/lib/hybrid_platforms_conductor/hpc_plugins/action/bash.rb +44 -0
  33. data/lib/hybrid_platforms_conductor/hpc_plugins/action/interactive.rb +44 -0
  34. data/lib/hybrid_platforms_conductor/hpc_plugins/action/my_action.rb.sample +79 -0
  35. data/lib/hybrid_platforms_conductor/hpc_plugins/action/remote_bash.rb +63 -0
  36. data/lib/hybrid_platforms_conductor/hpc_plugins/action/ruby.rb +69 -0
  37. data/lib/hybrid_platforms_conductor/hpc_plugins/action/scp.rb +61 -0
  38. data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/config.rb +78 -0
  39. data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/host_ip.rb +104 -0
  40. data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/host_keys.rb +114 -0
  41. data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/my_cmdb.rb.sample +129 -0
  42. data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/platform_handlers.rb +66 -0
  43. data/lib/hybrid_platforms_conductor/hpc_plugins/connector/my_connector.rb.sample +156 -0
  44. data/lib/hybrid_platforms_conductor/hpc_plugins/connector/ssh.rb +702 -0
  45. data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/platform_handler_plugin.rb.sample +292 -0
  46. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/docker.rb +148 -0
  47. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/my_provisioner.rb.sample +103 -0
  48. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/podman.rb +125 -0
  49. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox.rb +522 -0
  50. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox/proxmox_waiter.rb +707 -0
  51. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox/reserve_proxmox_container +122 -0
  52. data/lib/hybrid_platforms_conductor/hpc_plugins/report/confluence.rb +69 -0
  53. data/lib/hybrid_platforms_conductor/hpc_plugins/report/mediawiki.rb +164 -0
  54. data/lib/hybrid_platforms_conductor/hpc_plugins/report/my_report_plugin.rb.sample +88 -0
  55. data/lib/hybrid_platforms_conductor/hpc_plugins/report/stdout.rb +61 -0
  56. data/lib/hybrid_platforms_conductor/hpc_plugins/report/templates/confluence_inventory.html.erb +33 -0
  57. data/lib/hybrid_platforms_conductor/hpc_plugins/test/bitbucket_conf.rb +137 -0
  58. data/lib/hybrid_platforms_conductor/hpc_plugins/test/can_be_checked.rb +21 -0
  59. data/lib/hybrid_platforms_conductor/hpc_plugins/test/check_deploy_and_idempotence.rb +112 -0
  60. data/lib/hybrid_platforms_conductor/hpc_plugins/test/check_from_scratch.rb +35 -0
  61. data/lib/hybrid_platforms_conductor/hpc_plugins/test/connection.rb +28 -0
  62. data/lib/hybrid_platforms_conductor/hpc_plugins/test/deploy_freshness.rb +44 -0
  63. data/lib/hybrid_platforms_conductor/hpc_plugins/test/deploy_from_scratch.rb +36 -0
  64. data/lib/hybrid_platforms_conductor/hpc_plugins/test/deploy_removes_root_access.rb +49 -0
  65. data/lib/hybrid_platforms_conductor/hpc_plugins/test/divergence.rb +25 -0
  66. data/lib/hybrid_platforms_conductor/hpc_plugins/test/executables.rb +46 -0
  67. data/lib/hybrid_platforms_conductor/hpc_plugins/test/file_system.rb +45 -0
  68. data/lib/hybrid_platforms_conductor/hpc_plugins/test/file_system_hdfs.rb +45 -0
  69. data/lib/hybrid_platforms_conductor/hpc_plugins/test/hostname.rb +25 -0
  70. data/lib/hybrid_platforms_conductor/hpc_plugins/test/idempotence.rb +77 -0
  71. data/lib/hybrid_platforms_conductor/hpc_plugins/test/ip.rb +38 -0
  72. data/lib/hybrid_platforms_conductor/hpc_plugins/test/jenkins_ci_conf.rb +56 -0
  73. data/lib/hybrid_platforms_conductor/hpc_plugins/test/jenkins_ci_masters_ok.rb +54 -0
  74. data/lib/hybrid_platforms_conductor/hpc_plugins/test/linear_strategy.rb +47 -0
  75. data/lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb +82 -0
  76. data/lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb +120 -0
  77. data/lib/hybrid_platforms_conductor/hpc_plugins/test/my_test_plugin.rb.sample +143 -0
  78. data/lib/hybrid_platforms_conductor/hpc_plugins/test/orphan_files.rb +74 -0
  79. data/lib/hybrid_platforms_conductor/hpc_plugins/test/ports.rb +85 -0
  80. data/lib/hybrid_platforms_conductor/hpc_plugins/test/private_ips.rb +38 -0
  81. data/lib/hybrid_platforms_conductor/hpc_plugins/test/public_ips.rb +38 -0
  82. data/lib/hybrid_platforms_conductor/hpc_plugins/test/spectre-meltdown-checker.sh +1930 -0
  83. data/lib/hybrid_platforms_conductor/hpc_plugins/test/spectre.rb +56 -0
  84. data/lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb +31 -0
  85. data/lib/hybrid_platforms_conductor/hpc_plugins/test/vulnerabilities.rb +159 -0
  86. data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/confluence.rb +122 -0
  87. data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/my_test_report.rb.sample +48 -0
  88. data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/stdout.rb +120 -0
  89. data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb +46 -0
  90. data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_gauge.html.erb +49 -0
  91. data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/confluence.html.erb +242 -0
  92. data/lib/hybrid_platforms_conductor/io_router.rb +70 -0
  93. data/lib/hybrid_platforms_conductor/json_dumper.rb +88 -0
  94. data/lib/hybrid_platforms_conductor/logger_helpers.rb +319 -0
  95. data/lib/hybrid_platforms_conductor/mutex_dir +76 -0
  96. data/lib/hybrid_platforms_conductor/nodes_handler.rb +597 -0
  97. data/lib/hybrid_platforms_conductor/parallel_threads.rb +97 -0
  98. data/lib/hybrid_platforms_conductor/platform_handler.rb +188 -0
  99. data/lib/hybrid_platforms_conductor/platforms_handler.rb +118 -0
  100. data/lib/hybrid_platforms_conductor/plugin.rb +53 -0
  101. data/lib/hybrid_platforms_conductor/plugins.rb +101 -0
  102. data/lib/hybrid_platforms_conductor/provisioner.rb +181 -0
  103. data/lib/hybrid_platforms_conductor/report.rb +31 -0
  104. data/lib/hybrid_platforms_conductor/reports_handler.rb +84 -0
  105. data/lib/hybrid_platforms_conductor/services_handler.rb +274 -0
  106. data/lib/hybrid_platforms_conductor/test.rb +141 -0
  107. data/lib/hybrid_platforms_conductor/test_by_service.rb +22 -0
  108. data/lib/hybrid_platforms_conductor/test_report.rb +282 -0
  109. data/lib/hybrid_platforms_conductor/tests_runner.rb +590 -0
  110. data/lib/hybrid_platforms_conductor/thycotic.rb +92 -0
  111. data/lib/hybrid_platforms_conductor/topographer.rb +859 -0
  112. data/lib/hybrid_platforms_conductor/topographer/plugin.rb +20 -0
  113. data/lib/hybrid_platforms_conductor/topographer/plugins/graphviz.rb +127 -0
  114. data/lib/hybrid_platforms_conductor/topographer/plugins/json.rb +72 -0
  115. data/lib/hybrid_platforms_conductor/topographer/plugins/my_topographer_output_plugin.rb.sample +37 -0
  116. data/lib/hybrid_platforms_conductor/topographer/plugins/svg.rb +30 -0
  117. data/lib/hybrid_platforms_conductor/version.rb +5 -0
  118. data/spec/hybrid_platforms_conductor_test.rb +159 -0
  119. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/bash_spec.rb +43 -0
  120. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/interactive_spec.rb +18 -0
  121. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/remote_bash_spec.rb +102 -0
  122. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/ruby_spec.rb +108 -0
  123. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/scp_spec.rb +79 -0
  124. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions_spec.rb +199 -0
  125. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connection_spec.rb +212 -0
  126. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/cli_options_spec.rb +125 -0
  127. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/config_dsl_spec.rb +50 -0
  128. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/connectable_nodes_spec.rb +28 -0
  129. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/connections_spec.rb +448 -0
  130. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/global_helpers_spec.rb +313 -0
  131. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/node_helpers_spec.rb +32 -0
  132. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/remote_actions_spec.rb +134 -0
  133. data/spec/hybrid_platforms_conductor_test/api/actions_executor/logging_spec.rb +256 -0
  134. data/spec/hybrid_platforms_conductor_test/api/actions_executor/parallel_spec.rb +338 -0
  135. data/spec/hybrid_platforms_conductor_test/api/actions_executor/timeout_spec.rb +101 -0
  136. data/spec/hybrid_platforms_conductor_test/api/cmd_runner_spec.rb +165 -0
  137. data/spec/hybrid_platforms_conductor_test/api/config_spec.rb +238 -0
  138. data/spec/hybrid_platforms_conductor_test/api/deployer/check_spec.rb +9 -0
  139. data/spec/hybrid_platforms_conductor_test/api/deployer/deploy_spec.rb +243 -0
  140. data/spec/hybrid_platforms_conductor_test/api/deployer/parse_deploy_output_spec.rb +104 -0
  141. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioner_spec.rb +131 -0
  142. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/docker/Dockerfile +10 -0
  143. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/docker_spec.rb +123 -0
  144. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/podman_spec.rb +211 -0
  145. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/config_dsl_spec.rb +126 -0
  146. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/create_spec.rb +290 -0
  147. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/destroy_spec.rb +43 -0
  148. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/ip_spec.rb +60 -0
  149. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/proxmox.json +3 -0
  150. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/destroy_vm_spec.rb +82 -0
  151. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/expired_containers_spec.rb +786 -0
  152. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/ips_assignment_spec.rb +112 -0
  153. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/other_lxc_containers_resources_spec.rb +190 -0
  154. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/pve_node_resources_spec.rb +200 -0
  155. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/retries_spec.rb +35 -0
  156. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/reserve_proxmox_container/vm_ids_assignment_spec.rb +67 -0
  157. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/start_spec.rb +79 -0
  158. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/state_spec.rb +28 -0
  159. data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/proxmox/stop_spec.rb +41 -0
  160. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs/config_spec.rb +33 -0
  161. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs/host_ip_spec.rb +64 -0
  162. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs/host_keys_spec.rb +133 -0
  163. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs/platform_handlers_spec.rb +19 -0
  164. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs_plugins_api_spec.rb +446 -0
  165. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/common_spec.rb +127 -0
  166. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/git_diff_impacts_spec.rb +318 -0
  167. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/nodes_selectors_spec.rb +132 -0
  168. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/platform_handlers_plugins_api_spec.rb +60 -0
  169. data/spec/hybrid_platforms_conductor_test/api/nodes_handler/several_platforms_spec.rb +58 -0
  170. data/spec/hybrid_platforms_conductor_test/api/platform_handler_spec.rb +97 -0
  171. data/spec/hybrid_platforms_conductor_test/api/platforms_handler_spec.rb +104 -0
  172. data/spec/hybrid_platforms_conductor_test/api/plugins_spec.rb +243 -0
  173. data/spec/hybrid_platforms_conductor_test/api/reports_handler_spec.rb +44 -0
  174. data/spec/hybrid_platforms_conductor_test/api/services_handler/actions_to_deploy_spec.rb +121 -0
  175. data/spec/hybrid_platforms_conductor_test/api/services_handler/deploy_allowed_spec.rb +142 -0
  176. data/spec/hybrid_platforms_conductor_test/api/services_handler/log_info_spec.rb +101 -0
  177. data/spec/hybrid_platforms_conductor_test/api/services_handler/package_spec.rb +388 -0
  178. data/spec/hybrid_platforms_conductor_test/api/services_handler/parse_deploy_output_spec.rb +274 -0
  179. data/spec/hybrid_platforms_conductor_test/api/services_handler/prepare_for_deploy_spec.rb +264 -0
  180. data/spec/hybrid_platforms_conductor_test/api/tests_runner/common_spec.rb +194 -0
  181. data/spec/hybrid_platforms_conductor_test/api/tests_runner/global_spec.rb +37 -0
  182. data/spec/hybrid_platforms_conductor_test/api/tests_runner/node_check_spec.rb +194 -0
  183. data/spec/hybrid_platforms_conductor_test/api/tests_runner/node_spec.rb +137 -0
  184. data/spec/hybrid_platforms_conductor_test/api/tests_runner/node_ssh_spec.rb +257 -0
  185. data/spec/hybrid_platforms_conductor_test/api/tests_runner/platform_spec.rb +110 -0
  186. data/spec/hybrid_platforms_conductor_test/api/tests_runner/reports_spec.rb +367 -0
  187. data/spec/hybrid_platforms_conductor_test/api/tests_runner/test_plugins/bitbucket_conf_spec.rb +111 -0
  188. data/spec/hybrid_platforms_conductor_test/api/tests_runner/test_reports_plugins/confluence_spec.rb +29 -0
  189. data/spec/hybrid_platforms_conductor_test/cmdb_plugins/test_cmdb.rb +166 -0
  190. data/spec/hybrid_platforms_conductor_test/cmdb_plugins/test_cmdb2.rb +93 -0
  191. data/spec/hybrid_platforms_conductor_test/cmdb_plugins/test_cmdb_others.rb +60 -0
  192. data/spec/hybrid_platforms_conductor_test/cmdb_plugins/test_cmdb_others2.rb +58 -0
  193. data/spec/hybrid_platforms_conductor_test/executables/check-node_spec.rb +35 -0
  194. data/spec/hybrid_platforms_conductor_test/executables/deploy_spec.rb +35 -0
  195. data/spec/hybrid_platforms_conductor_test/executables/get_impacted_nodes_spec.rb +158 -0
  196. data/spec/hybrid_platforms_conductor_test/executables/last_deploys_spec.rb +173 -0
  197. data/spec/hybrid_platforms_conductor_test/executables/nodes_to_deploy_spec.rb +283 -0
  198. data/spec/hybrid_platforms_conductor_test/executables/options/actions_executor_spec.rb +28 -0
  199. data/spec/hybrid_platforms_conductor_test/executables/options/cmd_runner_spec.rb +28 -0
  200. data/spec/hybrid_platforms_conductor_test/executables/options/common_spec.rb +67 -0
  201. data/spec/hybrid_platforms_conductor_test/executables/options/deployer_spec.rb +251 -0
  202. data/spec/hybrid_platforms_conductor_test/executables/options/nodes_handler_spec.rb +111 -0
  203. data/spec/hybrid_platforms_conductor_test/executables/options/nodes_selectors_spec.rb +71 -0
  204. data/spec/hybrid_platforms_conductor_test/executables/options/reports_handler_spec.rb +54 -0
  205. data/spec/hybrid_platforms_conductor_test/executables/options/tests_runner_spec.rb +139 -0
  206. data/spec/hybrid_platforms_conductor_test/executables/report_spec.rb +60 -0
  207. data/spec/hybrid_platforms_conductor_test/executables/run_spec.rb +173 -0
  208. data/spec/hybrid_platforms_conductor_test/executables/ssh_config_spec.rb +35 -0
  209. data/spec/hybrid_platforms_conductor_test/executables/test_spec.rb +41 -0
  210. data/spec/hybrid_platforms_conductor_test/helpers/actions_executor_helpers.rb +98 -0
  211. data/spec/hybrid_platforms_conductor_test/helpers/cmd_runner_helpers.rb +92 -0
  212. data/spec/hybrid_platforms_conductor_test/helpers/cmdb_helpers.rb +37 -0
  213. data/spec/hybrid_platforms_conductor_test/helpers/config_helpers.rb +20 -0
  214. data/spec/hybrid_platforms_conductor_test/helpers/connector_ssh_helpers.rb +130 -0
  215. data/spec/hybrid_platforms_conductor_test/helpers/deployer_helpers.rb +149 -0
  216. data/spec/hybrid_platforms_conductor_test/helpers/deployer_test_helpers.rb +812 -0
  217. data/spec/hybrid_platforms_conductor_test/helpers/executables_helpers.rb +96 -0
  218. data/spec/hybrid_platforms_conductor_test/helpers/nodes_handler_helpers.rb +20 -0
  219. data/spec/hybrid_platforms_conductor_test/helpers/platform_handler_helpers.rb +35 -0
  220. data/spec/hybrid_platforms_conductor_test/helpers/platforms_handler_helpers.rb +127 -0
  221. data/spec/hybrid_platforms_conductor_test/helpers/plugins_helpers.rb +48 -0
  222. data/spec/hybrid_platforms_conductor_test/helpers/provisioner_proxmox_helpers.rb +789 -0
  223. data/spec/hybrid_platforms_conductor_test/helpers/reports_handler_helpers.rb +29 -0
  224. data/spec/hybrid_platforms_conductor_test/helpers/services_handler_helpers.rb +20 -0
  225. data/spec/hybrid_platforms_conductor_test/helpers/tests_runner_helpers.rb +38 -0
  226. data/spec/hybrid_platforms_conductor_test/mocked_lib/my_test_gem/hpc_plugins/test_plugin_type/test_plugin_id1.rb +22 -0
  227. data/spec/hybrid_platforms_conductor_test/mocked_lib/my_test_gem/hpc_plugins/test_plugin_type/test_plugin_id2.rb +22 -0
  228. data/spec/hybrid_platforms_conductor_test/mocked_lib/my_test_gem2/sub_dir/hpc_plugins/test_plugin_type/test_plugin_id3.rb +26 -0
  229. data/spec/hybrid_platforms_conductor_test/mocked_lib/my_test_gem2/sub_dir/hpc_plugins/test_plugin_type2/test_plugin_id4.rb +26 -0
  230. data/spec/hybrid_platforms_conductor_test/platform_handler_plugins/test.rb +225 -0
  231. data/spec/hybrid_platforms_conductor_test/platform_handler_plugins/test2.rb +11 -0
  232. data/spec/hybrid_platforms_conductor_test/report_plugin.rb +35 -0
  233. data/spec/hybrid_platforms_conductor_test/test_action.rb +66 -0
  234. data/spec/hybrid_platforms_conductor_test/test_connector.rb +151 -0
  235. data/spec/hybrid_platforms_conductor_test/test_plugins/global.rb +30 -0
  236. data/spec/hybrid_platforms_conductor_test/test_plugins/node.rb +53 -0
  237. data/spec/hybrid_platforms_conductor_test/test_plugins/node_check.rb +47 -0
  238. data/spec/hybrid_platforms_conductor_test/test_plugins/node_ssh.rb +42 -0
  239. data/spec/hybrid_platforms_conductor_test/test_plugins/platform.rb +50 -0
  240. data/spec/hybrid_platforms_conductor_test/test_plugins/several_checks.rb +50 -0
  241. data/spec/hybrid_platforms_conductor_test/test_provisioner.rb +95 -0
  242. data/spec/hybrid_platforms_conductor_test/tests_report_plugin.rb +49 -0
  243. data/spec/spec_helper.rb +111 -0
  244. metadata +566 -0
@@ -0,0 +1,43 @@
1
+ describe HybridPlatformsConductor::ActionsExecutor do
2
+
3
+ context 'checking actions\' plugin bash' do
4
+
5
+ it 'executes local Bash code' do
6
+ with_test_platform_for_action_plugins do |repository|
7
+ expect(test_actions_executor.execute_actions('node' => {
8
+ bash: "echo TestContent >#{repository}/test_file ; echo TestStdout ; echo TestStderr 1>&2"
9
+ })['node']).to eq [0, "TestStdout\n", "TestStderr\n"]
10
+ expect(File.read("#{repository}/test_file")).to eq "TestContent\n"
11
+ end
12
+ end
13
+
14
+ it 'executes local Bash code with timeout' do
15
+ with_test_platform_for_action_plugins do |repository|
16
+ expect(test_actions_executor.execute_actions(
17
+ { 'node' => {
18
+ bash: 'sleep 2 ; echo ShouldNotReach'
19
+ } },
20
+ timeout: 1
21
+ )['node']).to eq [:timeout, '', '']
22
+ end
23
+ end
24
+
25
+ it 'logs local Bash code' do
26
+ with_repository 'logs' do |logs_dir|
27
+ with_test_platform_for_action_plugins do |repository|
28
+ test_actions_executor.execute_actions({
29
+ 'node' => {
30
+ bash: 'echo TestStdout ; sleep 1 ; echo TestStderr 1>&2'
31
+ } },
32
+ log_to_dir: logs_dir
33
+ )
34
+ expect(File.exist?("#{logs_dir}/node.stdout")).to eq true
35
+ expect(File.read("#{logs_dir}/node.stdout")).to eq "TestStdout\nTestStderr\n"
36
+ end
37
+ end
38
+ end
39
+
40
+ end
41
+
42
+ end
43
+
@@ -0,0 +1,18 @@
1
+ describe HybridPlatformsConductor::ActionsExecutor do
2
+
3
+ context 'checking actions\' plugin interactive' do
4
+
5
+ it 'executes remote interactive session' do
6
+ with_test_platform_for_action_plugins do
7
+ test_actions_executor.execute_actions('node' => { interactive: true })
8
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
9
+ [:connectable_nodes_from, ['node']],
10
+ [:with_connection_to, ['node'], { no_exception: true }],
11
+ [:remote_interactive]
12
+ ]
13
+ end
14
+ end
15
+
16
+ end
17
+
18
+ end
@@ -0,0 +1,102 @@
1
+ describe HybridPlatformsConductor::ActionsExecutor do
2
+
3
+ context 'checking actions\' plugin remote_bash' do
4
+
5
+ it 'executes remote Bash code' do
6
+ with_test_platform_for_action_plugins do
7
+ test_actions_executor.execute_actions('node' => { remote_bash: 'remote_bash_cmd.bash' })
8
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
9
+ [:connectable_nodes_from, ['node']],
10
+ [:with_connection_to, ['node'], { no_exception: true }],
11
+ [:remote_bash, 'remote_bash_cmd.bash']
12
+ ]
13
+ end
14
+ end
15
+
16
+ it 'executes remote Bash code with timeout' do
17
+ with_test_platform_for_action_plugins do
18
+ test_actions_executor.connector(:test_connector).remote_bash_code = proc do |_stdout, _stderr, connector|
19
+ expect(connector.timeout).to eq 1
20
+ end
21
+ test_actions_executor.execute_actions(
22
+ { 'node' => { remote_bash: 'remote_bash_cmd.bash' } },
23
+ timeout: 1
24
+ )
25
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
26
+ [:connectable_nodes_from, ['node']],
27
+ [:with_connection_to, ['node'], { no_exception: true }],
28
+ [:remote_bash, 'remote_bash_cmd.bash']
29
+ ]
30
+ end
31
+ end
32
+
33
+ it 'executes remote Bash code in several lines' do
34
+ with_test_platform_for_action_plugins do
35
+ test_actions_executor.execute_actions('node' => { remote_bash: ['bash_cmd1.bash', 'bash_cmd2.bash', 'bash_cmd3.bash'] })
36
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
37
+ [:connectable_nodes_from, ['node']],
38
+ [:with_connection_to, ['node'], { no_exception: true }],
39
+ [:remote_bash, "bash_cmd1.bash\nbash_cmd2.bash\nbash_cmd3.bash"]
40
+ ]
41
+ end
42
+ end
43
+
44
+ it 'executes remote Bash code using the commands syntax' do
45
+ with_test_platform_for_action_plugins do
46
+ test_actions_executor.execute_actions('node' => { remote_bash: { commands: 'bash_cmd.bash' } })
47
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
48
+ [:connectable_nodes_from, ['node']],
49
+ [:with_connection_to, ['node'], { no_exception: true }],
50
+ [:remote_bash, 'bash_cmd.bash']
51
+ ]
52
+ end
53
+ end
54
+
55
+ it 'executes remote Bash code from a file' do
56
+ with_test_platform_for_action_plugins do |repository|
57
+ File.write("#{repository}/commands.txt", "bash_cmd1.bash\nbash_cmd2.bash")
58
+ test_actions_executor.execute_actions('node' => { remote_bash: { file: "#{repository}/commands.txt" } })
59
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
60
+ [:connectable_nodes_from, ['node']],
61
+ [:with_connection_to, ['node'], { no_exception: true }],
62
+ [:remote_bash, "bash_cmd1.bash\nbash_cmd2.bash"]
63
+ ]
64
+ end
65
+ end
66
+
67
+ it 'executes remote Bash code both from commands and a file' do
68
+ with_test_platform_for_action_plugins do |repository|
69
+ File.write("#{repository}/commands.txt", "bash_cmd3.bash\nbash_cmd4.bash")
70
+ test_actions_executor.execute_actions('node' => { remote_bash: {
71
+ commands: ['bash_cmd1.bash', 'bash_cmd2.bash'],
72
+ file: "#{repository}/commands.txt"
73
+ } })
74
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
75
+ [:connectable_nodes_from, ['node']],
76
+ [:with_connection_to, ['node'], { no_exception: true }],
77
+ [:remote_bash, "bash_cmd1.bash\nbash_cmd2.bash\nbash_cmd3.bash\nbash_cmd4.bash"]
78
+ ]
79
+ end
80
+ end
81
+
82
+ it 'executes remote Bash code with environment variables set' do
83
+ with_test_platform_for_action_plugins do
84
+ test_actions_executor.execute_actions('node' => { remote_bash: {
85
+ commands: 'bash_cmd.bash',
86
+ env: {
87
+ 'var1' => 'value1',
88
+ 'var2' => 'value2'
89
+ }
90
+ } })
91
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
92
+ [:connectable_nodes_from, ['node']],
93
+ [:with_connection_to, ['node'], { no_exception: true }],
94
+ [:remote_bash, "export var1='value1'\nexport var2='value2'\nbash_cmd.bash"]
95
+ ]
96
+ end
97
+ end
98
+
99
+ end
100
+
101
+ end
102
+
@@ -0,0 +1,108 @@
1
+ describe HybridPlatformsConductor::ActionsExecutor do
2
+
3
+ context 'checking actions\' plugin ruby' do
4
+
5
+ it 'executes local Ruby code' do
6
+ with_test_platform_for_action_plugins do
7
+ executed = false
8
+ expect(test_actions_executor.execute_actions('node' => {
9
+ ruby: proc do |stdout, stderr, action|
10
+ stdout << 'TestStdout'
11
+ stderr << 'TestStderr'
12
+ executed = true
13
+ end
14
+ })['node']).to eq [0, 'TestStdout', 'TestStderr']
15
+ expect(executed).to eq true
16
+ end
17
+ end
18
+
19
+ it 'executes local Ruby code with timeout' do
20
+ pending 'Implement timeout for Ruby actions'
21
+ with_test_platform_for_action_plugins do
22
+ executed = false
23
+ expect(test_actions_executor.execute_actions(
24
+ { 'node' => {
25
+ ruby: proc do |stdout, stderr, action|
26
+ sleep 2
27
+ stdout << 'ShouldNotReach'
28
+ executed = true
29
+ end
30
+ } },
31
+ timeout: 1
32
+ )['node']).to eq [:timeout, '', '']
33
+ expect(executed).to eq false
34
+ end
35
+ end
36
+
37
+ it 'logs local Ruby code' do
38
+ with_repository 'logs' do |logs_dir|
39
+ with_test_platform_for_action_plugins do
40
+ test_actions_executor.execute_actions(
41
+ { 'node' => {
42
+ ruby: proc do |stdout, stderr, action|
43
+ stdout << "TestStdout\n"
44
+ stderr << "TestStderr\n"
45
+ end
46
+ } },
47
+ log_to_dir: logs_dir
48
+ )
49
+ expect(File.exist?("#{logs_dir}/node.stdout")).to eq true
50
+ expect(File.read("#{logs_dir}/node.stdout")).to eq "TestStdout\nTestStderr\n"
51
+ end
52
+ end
53
+ end
54
+
55
+ it 'executes local Ruby code that needs an action' do
56
+ with_test_platform_for_action_plugins do
57
+ executed = false
58
+ expect(test_actions_executor.execute_actions('node' => {
59
+ ruby: proc do |stdout, stderr, action|
60
+ expect(action.is_a?(HybridPlatformsConductor::HpcPlugins::Action::Ruby)).to eq true
61
+ stdout << 'TestStdout'
62
+ stderr << 'TestStderr'
63
+ executed = true
64
+ end
65
+ })['node']).to eq [0, 'TestStdout', 'TestStderr']
66
+ expect(executed).to eq true
67
+ end
68
+ end
69
+
70
+ it 'executes local Ruby code that needs a connector' do
71
+ with_test_platform_for_action_plugins do
72
+ executed = false
73
+ expect(test_actions_executor.execute_actions('node' => {
74
+ ruby: {
75
+ code: proc do |stdout, stderr, action, connector|
76
+ expect(connector.is_a?(HybridPlatformsConductorTest::TestConnector)).to eq true
77
+ stdout << 'TestStdout'
78
+ stderr << 'TestStderr'
79
+ executed = true
80
+ end,
81
+ need_remote: true
82
+ }
83
+ })['node']).to eq [0, 'TestStdout', 'TestStderr']
84
+ expect(executed).to eq true
85
+ end
86
+ end
87
+
88
+ it 'executes local Ruby code that does not need a connector' do
89
+ with_test_platform_for_action_plugins do
90
+ executed = false
91
+ expect(test_actions_executor.execute_actions('node' => {
92
+ ruby: {
93
+ code: proc do |stdout, stderr, action, connector|
94
+ expect(connector).to be_nil
95
+ stdout << 'TestStdout'
96
+ stderr << 'TestStderr'
97
+ executed = true
98
+ end,
99
+ need_remote: false
100
+ }
101
+ })['node']).to eq [0, 'TestStdout', 'TestStderr']
102
+ expect(executed).to eq true
103
+ end
104
+ end
105
+
106
+ end
107
+
108
+ end
@@ -0,0 +1,79 @@
1
+ describe HybridPlatformsConductor::ActionsExecutor do
2
+
3
+ context 'checking actions\' plugin scp' do
4
+
5
+ it 'executes remote SCP' do
6
+ with_test_platform_for_action_plugins do
7
+ test_actions_executor.execute_actions('node' => { scp: { 'from' => 'to' } })
8
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
9
+ [:connectable_nodes_from, ['node']],
10
+ [:with_connection_to, ['node'], { no_exception: true }],
11
+ [:remote_copy, 'from', 'to']
12
+ ]
13
+ end
14
+ end
15
+
16
+ it 'executes remote SCP with timeout' do
17
+ with_test_platform_for_action_plugins do
18
+ test_actions_executor.connector(:test_connector).remote_copy_code = proc do |_stdout, _stderr, connector|
19
+ expect(connector.timeout).to eq 1
20
+ end
21
+ test_actions_executor.execute_actions(
22
+ { 'node' => { scp: { 'from' => 'to' } } },
23
+ timeout: 1
24
+ )
25
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
26
+ [:connectable_nodes_from, ['node']],
27
+ [:with_connection_to, ['node'], { no_exception: true }],
28
+ [:remote_copy, 'from', 'to']
29
+ ]
30
+ end
31
+ end
32
+
33
+ it 'executes remote SCP on several files' do
34
+ with_test_platform_for_action_plugins do
35
+ test_actions_executor.execute_actions('node' => { scp: {
36
+ 'from1' => 'to1',
37
+ 'from2' => 'to2'
38
+ } })
39
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
40
+ [:connectable_nodes_from, ['node']],
41
+ [:with_connection_to, ['node'], { no_exception: true }],
42
+ [:remote_copy, 'from1', 'to1'],
43
+ [:remote_copy, 'from2', 'to2']
44
+ ]
45
+ end
46
+ end
47
+
48
+ it 'executes remote SCP with sudo' do
49
+ with_test_platform_for_action_plugins do
50
+ test_actions_executor.execute_actions('node' => { scp: {
51
+ 'from' => 'to',
52
+ sudo: true
53
+ } })
54
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
55
+ [:connectable_nodes_from, ['node']],
56
+ [:with_connection_to, ['node'], { no_exception: true }],
57
+ [:remote_copy, 'from', 'to', { sudo: true }]
58
+ ]
59
+ end
60
+ end
61
+
62
+ it 'executes remote SCP with different owner and group' do
63
+ with_test_platform_for_action_plugins do
64
+ test_actions_executor.execute_actions('node' => { scp: {
65
+ 'from' => 'to',
66
+ owner: 'new_owner',
67
+ group: 'new_group'
68
+ } })
69
+ expect(test_actions_executor.connector(:test_connector).calls).to eq [
70
+ [:connectable_nodes_from, ['node']],
71
+ [:with_connection_to, ['node'], { no_exception: true }],
72
+ [:remote_copy, 'from', 'to', { owner: 'new_owner', group: 'new_group' }]
73
+ ]
74
+ end
75
+ end
76
+
77
+ end
78
+
79
+ end
@@ -0,0 +1,199 @@
1
+ describe HybridPlatformsConductor::ActionsExecutor do
2
+
3
+ context 'checking actions handling' do
4
+
5
+ # Instantiate a test platform, with the test action registered in Actions Executor.
6
+ #
7
+ # Parameters::
8
+ # * Proc: Code called with the environment ready
9
+ # * Parameters::
10
+ # * *repository* (String): Path to the repository
11
+ def with_test_platform_for_actions
12
+ with_test_platform_for_executor(nodes: { 'node1' => {}, 'node2' => {}, 'node3' => {} }) do |repository|
13
+ yield repository
14
+ end
15
+ end
16
+
17
+ it 'executes a simple action on 1 node' do
18
+ with_test_platform_for_actions do
19
+ test_actions_executor.execute_actions('node1' => { test_action: 'Action executed' })
20
+ expect(action_executions).to eq [{ node: 'node1', message: 'Action executed' }]
21
+ end
22
+ end
23
+
24
+ it 'fails to execute an unknown action' do
25
+ with_test_platform_for_actions do
26
+ expect { test_actions_executor.execute_actions('node1' => { unknown_action: 'Action executed' }) }.to raise_error(/Unknown action type unknown_action/)
27
+ end
28
+ end
29
+
30
+ it 'executes a simple action on several nodes' do
31
+ with_test_platform_for_actions do
32
+ test_actions_executor.execute_actions(%w[node1 node2 node3] => { test_action: 'Action executed' })
33
+ expect(action_executions).to eq [
34
+ { node: 'node1', message: 'Action executed' },
35
+ { node: 'node2', message: 'Action executed' },
36
+ { node: 'node3', message: 'Action executed' }
37
+ ]
38
+ end
39
+ end
40
+
41
+ it 'executes several actions on 1 node' do
42
+ with_test_platform_for_actions do
43
+ test_actions_executor.execute_actions('node1' => [
44
+ { test_action: 'Action 1 executed' },
45
+ { test_action: 'Action 2 executed' },
46
+ { test_action: 'Action 3 executed' }
47
+ ])
48
+ expect(action_executions).to eq [
49
+ { node: 'node1', message: 'Action 1 executed' },
50
+ { node: 'node1', message: 'Action 2 executed' },
51
+ { node: 'node1', message: 'Action 3 executed' }
52
+ ]
53
+ end
54
+ end
55
+
56
+ it 'executes different actions on several nodes' do
57
+ with_test_platform_for_actions do
58
+ test_actions_executor.execute_actions(
59
+ 'node1' => { test_action: 'Action 1 executed' },
60
+ 'node2' => { test_action: 'Action 2 executed' },
61
+ 'node3' => { test_action: 'Action 3 executed' }
62
+ )
63
+ expect(action_executions).to eq [
64
+ { node: 'node1', message: 'Action 1 executed' },
65
+ { node: 'node2', message: 'Action 2 executed' },
66
+ { node: 'node3', message: 'Action 3 executed' }
67
+ ]
68
+ end
69
+ end
70
+
71
+ it 'executes several actions of different types' do
72
+ with_test_platform_for_actions do
73
+ actions_executed = []
74
+ expect(test_actions_executor.execute_actions('node1' => [
75
+ { ruby: proc do |stdout, stderr|
76
+ stdout << 'action1_stdout '
77
+ stderr << 'action1_stderr '
78
+ actions_executed << 'action1'
79
+ end },
80
+ { bash: 'echo action2_stdout' },
81
+ { ruby: proc do |stdout, stderr|
82
+ stdout << 'action3_stdout'
83
+ stderr << 'action3_stderr'
84
+ actions_executed << 'action3'
85
+ end }
86
+ ])).to eq('node1' => [0, "action1_stdout action2_stdout\naction3_stdout", 'action1_stderr action3_stderr'])
87
+ expect(actions_executed).to eq %w[action1 action3]
88
+ end
89
+ end
90
+
91
+ it 'executes several actions on 1 node specified using different selectors' do
92
+ with_test_platform_for_actions do
93
+ actions_executed = []
94
+ test_actions_executor.execute_actions(
95
+ 'node1' => { test_action: 'Action 1 executed' },
96
+ '/node1/' => { test_action: 'Action 2 executed' }
97
+ )
98
+ expect(action_executions).to eq [
99
+ { node: 'node1', message: 'Action 1 executed' },
100
+ { node: 'node1', message: 'Action 2 executed' }
101
+ ]
102
+ end
103
+ end
104
+
105
+ it 'fails to execute an action on an unknown node' do
106
+ with_test_platform_for_actions do
107
+ expect { test_actions_executor.execute_actions('unknown_node' => { test_action: 'Action executed' }) }.to raise_error(RuntimeError, 'Unknown nodes: unknown_node')
108
+ expect(action_executions).to eq []
109
+ end
110
+ end
111
+
112
+ it 'fails to execute actions being interactive in parallel' do
113
+ with_test_platform_for_actions do
114
+ expect do
115
+ test_actions_executor.execute_actions(
116
+ {
117
+ 'node1' => { test_action: 'Action executed' },
118
+ 'node2' => { interactive: true }
119
+ },
120
+ concurrent: true
121
+ )
122
+ end.to raise_error(RuntimeError, 'Cannot have concurrent executions for interactive sessions')
123
+ end
124
+ end
125
+
126
+ it 'returns errors without failing for actions having command issues' do
127
+ with_test_platform_for_actions do
128
+ expect(test_actions_executor.execute_actions(
129
+ 'node1' => { test_action: { code: proc { |stdout| stdout << 'Action 1' } } },
130
+ 'node2' => { test_action: { code: proc { raise HybridPlatformsConductor::CmdRunner::UnexpectedExitCodeError, 'Command returned 1' } } },
131
+ 'node3' => { test_action: { code: proc { |stdout| stdout << 'Action 3' } } }
132
+ )).to eq(
133
+ 'node1' => [0, 'Action 1', ''],
134
+ 'node2' => [:failed_command, '', "Command returned 1\n"],
135
+ 'node3' => [0, 'Action 3', '']
136
+ )
137
+ end
138
+ end
139
+
140
+ it 'returns errors without failing for actions having timeout issues' do
141
+ with_test_platform_for_actions do
142
+ expect(test_actions_executor.execute_actions(
143
+ 'node1' => { test_action: { code: proc { |stdout| stdout << 'Action 1' } } },
144
+ 'node2' => { test_action: { code: proc { raise HybridPlatformsConductor::CmdRunner::TimeoutError } } },
145
+ 'node3' => { test_action: { code: proc { |stdout| stdout << 'Action 3' } } }
146
+ )).to eq(
147
+ 'node1' => [0, 'Action 1', ''],
148
+ 'node2' => [:timeout, '', ''],
149
+ 'node3' => [0, 'Action 3', '']
150
+ )
151
+ end
152
+ end
153
+
154
+ it 'returns errors without failing for actions having connection issues' do
155
+ with_test_platform_for_actions do
156
+ expect(test_actions_executor.execute_actions(
157
+ 'node1' => { test_action: { code: proc { |stdout| stdout << 'Action 1' } } },
158
+ 'node2' => { test_action: { code: proc { raise HybridPlatformsConductor::ActionsExecutor::ConnectionError, 'Can\'t connect' } } },
159
+ 'node3' => { test_action: { code: proc { |stdout| stdout << 'Action 3' } } }
160
+ )).to eq(
161
+ 'node1' => [0, 'Action 1', ''],
162
+ 'node2' => [:connection_error, '', "Can't connect\n"],
163
+ 'node3' => [0, 'Action 3', '']
164
+ )
165
+ end
166
+ end
167
+
168
+ it 'returns errors without failing for actions having unhandled exceptions' do
169
+ with_test_platform_for_actions do
170
+ expect(test_actions_executor.execute_actions(
171
+ 'node1' => { test_action: { code: proc { |stdout| stdout << 'Action 1' } } },
172
+ 'node2' => { test_action: { code: proc { raise 'Strange error' } } },
173
+ 'node3' => { test_action: { code: proc { |stdout| stdout << 'Action 3' } } }
174
+ )).to eq(
175
+ 'node1' => [0, 'Action 1', ''],
176
+ 'node2' => [:failed_action, '', "Strange error\n"],
177
+ 'node3' => [0, 'Action 3', '']
178
+ )
179
+ end
180
+ end
181
+
182
+ it 'returns errors without failing for actions on nodes having no connectors' do
183
+ with_test_platform_for_actions do
184
+ test_actions_executor.connector(:test_connector).accept_nodes = %w[node1 node3]
185
+ expect(test_actions_executor.execute_actions(
186
+ 'node1' => { test_action: { need_connector: true, code: proc { |stdout| stdout << 'Action 1' } } },
187
+ 'node2' => { test_action: { need_connector: true, code: proc { |stdout| stdout << 'Action 2' } } },
188
+ 'node3' => { test_action: { need_connector: true, code: proc { |stdout| stdout << 'Action 3' } } }
189
+ )).to eq(
190
+ 'node1' => [0, 'Action 1', ''],
191
+ 'node2' => [:no_connector, '', 'Unable to get a connector to node2'],
192
+ 'node3' => [0, 'Action 3', '']
193
+ )
194
+ end
195
+ end
196
+
197
+ end
198
+
199
+ end