@@ -318,6 +318,54 @@ Feature: federated
318318 | type | file |
319319 | file_id | A_NUMBER |
320320
321+ Scenario : List federated share from another server no longer reachable
322+ Given Using server "LOCAL"
323+ And user "user0" exists
324+ Given Using server "REMOTE"
325+ And user "user1" exists
326+ # Rename file so it has a unique name in the target server (as the target
327+ # server may have its own /textfile0.txt" file)
328+ And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
329+ And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
330+ And Using server "LOCAL"
331+ And User "user0" from server "LOCAL" accepts last pending share
332+ And remote server is stopped
333+ When As an "user0"
334+ And sending "GET" to "/apps/files_sharing/api/v1/remote_shares"
335+ Then the list of returned shares has 1 shares
336+ And remote share 0 is returned with
337+ | remote | http ://localhost :8180 / |
338+ | name | /remote -share .txt |
339+ | owner | user1 |
340+ | user | user0 |
341+ | mountpoint | /remote -share .txt |
342+
343+ Scenario : List federated share from another server no longer reachable after caching the file entry
344+ Given Using server "LOCAL"
345+ And user "user0" exists
346+ Given Using server "REMOTE"
347+ And user "user1" exists
348+ # Rename file so it has a unique name in the target server (as the target
349+ # server may have its own /textfile0.txt" file)
350+ And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
351+ And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
352+ And Using server "LOCAL"
353+ And User "user0" from server "LOCAL" accepts last pending share
354+ # Checking that the file exists caches the file entry, which causes an
355+ # exception to be thrown when getting the file info if the remote server is
356+ # unreachable.
357+ And as "user0" the file "/remote-share.txt" exists
358+ And remote server is stopped
359+ When As an "user0"
360+ And sending "GET" to "/apps/files_sharing/api/v1/remote_shares"
361+ Then the list of returned shares has 1 shares
362+ And remote share 0 is returned with
363+ | remote | http ://localhost :8180 / |
364+ | name | /remote -share .txt |
365+ | owner | user1 |
366+ | user | user0 |
367+ | mountpoint | /remote -share .txt |
368+
321369
322370
323371 Scenario : Delete federated share with another server
@@ -382,6 +430,30 @@ Feature: federated
382430 And sending "GET" to "/apps/files_sharing/api/v1/shares"
383431 And the list of returned shares has 0 shares
384432
433+ Scenario : Delete federated share from another server no longer reachable
434+ Given Using server "LOCAL"
435+ And user "user0" exists
436+ Given Using server "REMOTE"
437+ And user "user1" exists
438+ # Rename file so it has a unique name in the target server (as the target
439+ # server may have its own /textfile0.txt" file)
440+ And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
441+ And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
442+ And Using server "LOCAL"
443+ And User "user0" from server "LOCAL" accepts last pending share
444+ And as "user0" the file "/remote-share.txt" exists
445+ And As an "user0"
446+ And sending "GET" to "/apps/files_sharing/api/v1/remote_shares"
447+ And the list of returned shares has 1 shares
448+ And remote server is stopped
449+ When user "user0" deletes last accepted remote share
450+ Then the OCS status code should be "100"
451+ And the HTTP status code should be "200"
452+ And as "user0" the file "/remote-share.txt" does not exist
453+ And As an "user0"
454+ And sending "GET" to "/apps/files_sharing/api/v1/remote_shares"
455+ And the list of returned shares has 0 shares
456+
385457 Scenario : Delete federated share file from another server
386458 Given Using server "LOCAL"
387459 And user "user0" exists
@@ -410,3 +482,26 @@ Feature: federated
410482 And As an "user1"
411483 And sending "GET" to "/apps/files_sharing/api/v1/shares"
412484 And the list of returned shares has 0 shares
485+
486+ Scenario : Delete federated share file from another server no longer reachable
487+ Given Using server "LOCAL"
488+ And user "user0" exists
489+ Given Using server "REMOTE"
490+ And user "user1" exists
491+ # Rename file so it has a unique name in the target server (as the target
492+ # server may have its own /textfile0.txt" file)
493+ And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
494+ And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
495+ And Using server "LOCAL"
496+ And User "user0" from server "LOCAL" accepts last pending share
497+ And as "user0" the file "/remote-share.txt" exists
498+ And As an "user0"
499+ And sending "GET" to "/apps/files_sharing/api/v1/remote_shares"
500+ And the list of returned shares has 1 shares
501+ And remote server is stopped
502+ When User "user0" deletes file "/remote-share.txt"
503+ Then the HTTP status code should be "204"
504+ And as "user0" the file "/remote-share.txt" does not exist
505+ And As an "user0"
506+ And sending "GET" to "/apps/files_sharing/api/v1/remote_shares"
507+ And the list of returned shares has 0 shares
0 commit comments