@@ -257,10 +257,11 @@ def mock_already_installed(package, expected_version, installed)
257
257
end
258
258
runner . converge_dsl do
259
259
efs 'mount' do
260
- efs_fs_id_array %w( id_1 id_2 id_3 )
261
- shared_dir_array %w( shared_dir_1 /shared_dir_2 /shared_dir_3 )
262
- efs_encryption_in_transit_array %w( true true not_true )
263
- efs_iam_authorization_array %w( not_true true true )
260
+ efs_fs_id_array %w( id_1 id_2 id_3 id_4 )
261
+ shared_dir_array %w( shared_dir_1 /shared_dir_2 /shared_dir_3 /shared_dir_4 )
262
+ efs_encryption_in_transit_array %w( true true not_true true )
263
+ efs_iam_authorization_array %w( not_true true true true )
264
+ efs_access_point_id_array %w( none none none ap )
264
265
action :mount
265
266
end
266
267
end
@@ -270,14 +271,15 @@ def mock_already_installed(package, expected_version, installed)
270
271
stub_command ( "mount | grep ' /shared_dir_1 '" ) . and_return ( false )
271
272
stub_command ( "mount | grep ' /shared_dir_2 '" ) . and_return ( true )
272
273
stub_command ( "mount | grep ' /shared_dir_3 '" ) . and_return ( true )
274
+ stub_command ( "mount | grep ' /shared_dir_4 '" ) . and_return ( false )
273
275
end
274
276
275
277
it 'mounts efs' do
276
278
is_expected . to mount_efs ( 'mount' )
277
279
end
278
280
279
281
it 'creates shared directory' do
280
- %w( /shared_dir_1 /shared_dir_2 /shared_dir_3 ) . each do |shared_dir |
282
+ %w( /shared_dir_1 /shared_dir_2 /shared_dir_3 /shared_dir_4 ) . each do |shared_dir |
281
283
is_expected . to create_directory ( shared_dir )
282
284
. with ( owner : 'root' )
283
285
. with ( group : 'root' )
@@ -295,6 +297,15 @@ def mock_already_installed(package, expected_version, installed)
295
297
. with ( options : %w( _netdev noresvport tls ) )
296
298
. with ( retries : 10 )
297
299
. with ( retry_delay : 60 )
300
+
301
+ is_expected . to mount_mount ( '/shared_dir_4' )
302
+ . with ( device : 'id_4:/' )
303
+ . with ( fstype : 'efs' )
304
+ . with ( dump : 0 )
305
+ . with ( pass : 0 )
306
+ . with ( options : %w( _netdev noresvport tls iam accesspoint=ap ) )
307
+ . with ( retries : 10 )
308
+ . with ( retry_delay : 60 )
298
309
end
299
310
300
311
it 'enables shared dir mount if already mounted' do
0 commit comments