MinionPoolMock.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import {
  2. MinionMachine,
  3. MinionPool,
  4. MinionPoolDetails,
  5. } from "@src/@types/MinionPool";
  6. export const MINION_MACHINE_MOCK: MinionMachine = {
  7. id: "minion-machine-id",
  8. created_at: "2023-11-26T12:00:00Z",
  9. updated_at: "2023-11-26T12:00:00Z",
  10. allocation_status: "ALLOCATED",
  11. connection_info: {},
  12. power_status: "on",
  13. provider_properties: {},
  14. last_used_at: "2023-11-26T12:00:00Z",
  15. allocated_action: "replica-id",
  16. };
  17. export const MINION_POOL_MOCK: MinionPool = {
  18. id: "minion-pool-id",
  19. created_at: "2023-11-26T12:00:00Z",
  20. updated_at: "2023-11-26T12:00:00Z",
  21. name: "minion-pool-name",
  22. os_type: "linux",
  23. status: "ACTIVE",
  24. minimum_minions: 1,
  25. maximum_minions: 10,
  26. environment_options: {
  27. option_1: "option_1_value",
  28. object_option: {
  29. object_option_1: "object_option_1_value",
  30. },
  31. array_option: ["array_option_1_value", "array_option_2_value"],
  32. object_with_mappings: {
  33. mappings: [
  34. {
  35. source: "source_value",
  36. destination: "destination_value",
  37. },
  38. ],
  39. },
  40. },
  41. endpoint_id: "openstack",
  42. notes: "minion-pool-notes",
  43. platform: "source",
  44. minion_machines: [{ ...MINION_MACHINE_MOCK }],
  45. minion_retention_strategy: "poweroff",
  46. minion_max_idle_time: 0,
  47. };
  48. export const MINION_POOL_DETAILS_MOCK: MinionPoolDetails = {
  49. ...MINION_POOL_MOCK,
  50. events: [
  51. {
  52. id: "minion-pool-event-id",
  53. index: 0,
  54. level: "INFO",
  55. message: "minion-pool-event-message",
  56. created_at: "2023-11-26T12:00:00Z",
  57. },
  58. {
  59. id: "minion-pool-event-id-2",
  60. index: 1,
  61. level: "DEBUG",
  62. message: "minion-pool-event-message-debug",
  63. created_at: "2023-11-25T12:00:00Z",
  64. },
  65. ],
  66. progress_updates: [
  67. {
  68. id: "minion-pool-progress-update-id",
  69. current_step: 0,
  70. message: "minion-pool-progress-update-message",
  71. created_at: "2023-11-26T12:00:00Z",
  72. },
  73. {
  74. id: "minion-pool-progress-update-2",
  75. current_step: 1,
  76. message: "minion-pool-progress-update-message-2",
  77. created_at: "2023-11-25T12:00:00Z",
  78. },
  79. ],
  80. };