test_slurm_start_services.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. #Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ---
  15. # Testcase OMNIA_USP_US_VFSP_TC_007
  16. # Execute slurm_start_services role in manager node with os installed centos 7.9
  17. - name: OMNIA_USP_US_VFSP_TC_007
  18. hosts: manager
  19. vars_files:
  20. - test_vars/test_slurm_start_services_vars.yml
  21. tasks:
  22. - block:
  23. - name: Call slurm start services role
  24. include_role:
  25. name: ../roles/slurm_start_services
  26. tags: TC_007
  27. - name: Checking slurmctld service status
  28. systemd:
  29. name: slurmctld
  30. register: slurmctld_service
  31. tags: TC_007, VERIFY_007
  32. - name: Checking slurmdbd service status
  33. systemd:
  34. name: slurmdbd
  35. register: slurmdbd_service
  36. tags: TC_007, VERIFY_007
  37. - name: Check if slurm is installed
  38. command: sinfo -V
  39. register: slurm_version
  40. changed_when: false
  41. ignore_errors: True
  42. tags: TC_007,VERIFY_007
  43. - name: Validating slurmctld service status
  44. assert:
  45. that:
  46. - slurmctld_service.status.ActiveState == 'active'
  47. fail_msg: "{{ slurmctld_service_fail_msg }}"
  48. success_msg: "{{ slurmctld_service_success_msg }}"
  49. tags: TC_007, VERIFY_007
  50. - name: Validating slurmdbd service status
  51. assert:
  52. that:
  53. - slurmdbd_service.status.ActiveState == 'active'
  54. fail_msg: "{{ slurmdbd_service_fail_msg }}"
  55. success_msg: "{{ slurmdbd_service_success_msg }}"
  56. tags: TC_007, VERIFY_007
  57. - name: Validate slurm installation
  58. assert:
  59. that: "'command not found' not in slurm_version.stdout"
  60. fail_msg: "{{ slurm_status_fail_msg }}"
  61. success_msg: "{{ slurm_status_success_msg }}"
  62. tags: TC_007, VERIFY_007
  63. # Testcase OMNIA_USP_US_VFSP_TC_008
  64. # Execute slurm_start_services role in manager node with services already running
  65. - name: OMNIA_USP_US_VFSP_TC_008
  66. hosts: manager
  67. vars_files:
  68. - test_vars/test_slurm_start_services_vars.yml
  69. tasks:
  70. - block:
  71. - name: Call slurm start services role
  72. include_role:
  73. name: ../roles/slurm_start_services
  74. tags: TC_008
  75. - name: Checking slurmctld service status
  76. systemd:
  77. name: slurmctld
  78. register: slurmctld_service
  79. tags: TC_008, VERIFY_008
  80. - name: Checking slurmdbd service status
  81. systemd:
  82. name: slurmdbd
  83. register: slurmdbd_service
  84. tags: TC_008, VERIFY_008
  85. - name: Check if slurm is installed
  86. command: sinfo -V
  87. register: slurm_version
  88. changed_when: false
  89. ignore_errors: True
  90. tags: TC_008,VERIFY_008
  91. - name: Validating slurmctld service status
  92. assert:
  93. that:
  94. - slurmctld_service.status.ActiveState == 'active'
  95. fail_msg: "{{ slurmctld_service_fail_msg }}"
  96. success_msg: "{{ slurmctld_service_success_msg }}"
  97. tags: TC_008, VERIFY_008
  98. - name: Validating slurmdbd service status
  99. assert:
  100. that:
  101. - slurmdbd_service.status.ActiveState == 'active'
  102. fail_msg: "{{ slurmdbd_service_fail_msg }}"
  103. success_msg: "{{ slurmdbd_service_success_msg }}"
  104. tags: TC_008, VERIFY_008
  105. - name: Validate slurm installation
  106. assert:
  107. that: "'command not found' not in slurm_version.stdout"
  108. fail_msg: "{{ slurm_status_fail_msg }}"
  109. success_msg: "{{ slurm_status_success_msg }}"
  110. tags: TC_008, VERIFY_008