Skip to content

Commit de10f70

Browse files
author
Himani Anil Deshpande
committed
[NVIDIA_IMEX] Adding Kitchen test for Installation and Configuration
1 parent 6aa54b3 commit de10f70

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright:: 2025 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
5+
#
6+
# http://aws.amazon.com/apache2.0/
7+
#
8+
# or in the "LICENSE.txt" file accompanying this file.
9+
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied.
10+
# See the License for the specific language governing permissions and limitations under the License.
11+
12+
control 'tag:install_expected_versions_of_nvidia_imex_installed' do
13+
only_if { ['yes', true, 'true'].include?(node['cluster']['nvidia']['enabled']) }
14+
15+
describe package('nvidia-imex') do
16+
it { should be_installed }
17+
its('version') { should match /#{node['cluster']['nvidia']['driver_version']}/ }
18+
end
19+
20+
%w(/usr/bin/nvidia-imex /usr/bin/nvidia-imex-ctl).each do |path|
21+
describe file(path) do
22+
it { should exist }
23+
its('owner') { should eq 'root' }
24+
its('group') { should eq 'root' }
25+
its('mode') { should cmp '0755' }
26+
end
27+
end
28+
29+
nvidia_imex_dir = "#{node['cluster']['shared_dir']}/nvidia-imex"
30+
31+
%w("#{nvidia_imex_dir}/config.cfg" "#{nvidia_imex_dir}/nodes_config.cfg").each do |conf_files|
32+
describe file(conf_files) do
33+
it { should exist }
34+
its('owner') { should eq 'root' }
35+
its('group') { should eq 'root' }
36+
its('mode') { should cmp '0755' }
37+
end
38+
end
39+
end
40+
41+
control 'tag:config_nvidia_fabric_manager_enabled' do
42+
only_if { instance.nvs_switch_enabled? }
43+
44+
describe service('nvidia-imex') do
45+
it { should be_enabled }
46+
it { should be_running }
47+
end
48+
end

0 commit comments

Comments
 (0)