@@ -70,7 +70,7 @@ def self.configure(chef_run)
7070 end
7171end
7272
73- describe 'nvidia_imex:imex_installed' do
73+ describe 'nvidia_imex:imex_installed? ' do
7474 for_all_oses do |platform , version |
7575 context "on #{ platform } #{ version } " do
7676 cached ( :chef_run ) do
@@ -89,11 +89,11 @@ def self.configure(chef_run)
8989
9090 if platform == 'amazon' && version == '2'
9191 it 'is true' do
92- expect ( resource . imex_installed ) . to eq ( true )
92+ expect ( resource . imex_installed? ) . to eq ( true )
9393 end
9494 else
9595 it 'is false' do
96- expect ( resource . imex_installed ) . to eq ( false )
96+ expect ( resource . imex_installed? ) . to eq ( false )
9797 end
9898 end
9999 end
@@ -105,7 +105,7 @@ def self.configure(chef_run)
105105 end
106106
107107 it 'is true' do
108- expect ( resource . imex_installed ) . to eq ( true )
108+ expect ( resource . imex_installed? ) . to eq ( true )
109109 end
110110 end
111111
@@ -116,7 +116,7 @@ def self.configure(chef_run)
116116 end
117117
118118 it 'is true' do
119- expect ( resource . imex_installed ) . to eq ( true )
119+ expect ( resource . imex_installed? ) . to eq ( true )
120120 end
121121 end
122122
@@ -127,7 +127,7 @@ def self.configure(chef_run)
127127 end
128128
129129 it 'is true' do
130- expect ( resource . imex_installed ) . to eq ( true )
130+ expect ( resource . imex_installed? ) . to eq ( true )
131131 end
132132 end
133133 end
@@ -155,7 +155,7 @@ def self.configure(chef_run)
155155 context 'when nvidia-imex binary already exists' do
156156 cached ( :chef_run ) do
157157 stubs_for_resource ( 'nvidia_imex' ) do |res |
158- allow ( res ) . to receive ( :imex_installed ) . and_return ( true )
158+ allow ( res ) . to receive ( :imex_installed? ) . and_return ( true )
159159 end
160160 runner = runner ( platform : platform , version : version , step_into : [ 'nvidia_imex' ] )
161161 ConvergeNvidiaImex . install ( runner )
@@ -273,7 +273,7 @@ def self.configure(chef_run)
273273 context "when nvidia-imex binary is not installed" do
274274 cached ( :chef_run ) do
275275 stubs_for_resource ( 'nvidia_imex' ) do |res |
276- allow ( res ) . to receive ( :imex_installed ) . and_return ( false )
276+ allow ( res ) . to receive ( :imex_installed? ) . and_return ( false )
277277 end
278278 runner = runner ( platform : platform , version : version , step_into : [ 'nvidia_imex' ] )
279279 ConvergeNvidiaImex . configure ( runner )
@@ -289,7 +289,7 @@ def self.configure(chef_run)
289289 context "when get_nvswitch_count > 1 on #{ node_type } node" do
290290 cached ( :chef_run ) do
291291 stubs_for_provider ( 'nvidia_imex[configure]' ) do |pro |
292- allow ( pro ) . to receive ( :imex_installed ) . and_return ( true )
292+ allow ( pro ) . to receive ( :imex_installed? ) . and_return ( true )
293293 allow ( pro ) . to receive ( :get_device_ids ) . and_return ( { 'gb200' => 'test' } )
294294 allow ( pro ) . to receive ( :get_nvswitch_count ) . with ( 'test' ) . and_return ( 4 )
295295 end
@@ -318,7 +318,7 @@ def self.configure(chef_run)
318318 context "when get_nvswitch_count <= 1" do
319319 cached ( :chef_run ) do
320320 stubs_for_provider ( 'nvidia_imex[configure]' ) do |pro |
321- allow ( pro ) . to receive ( :imex_installed ) . and_return ( true )
321+ allow ( pro ) . to receive ( :imex_installed? ) . and_return ( true )
322322 allow ( pro ) . to receive ( :get_device_ids ) . and_return ( { 'gb200' => 'test' } )
323323 allow ( pro ) . to receive ( :get_nvswitch_count ) . with ( 'test' ) . and_return ( 1 )
324324 end
0 commit comments