@@ -278,13 +278,64 @@ Feature: federated
278278
279279
280280
281+ Scenario : Delete federate share with another server
282+ Given Using server "LOCAL"
283+ And user "user0" exists
284+ Given Using server "REMOTE"
285+ And user "user1" exists
286+ # Rename file so it has a unique name in the target server (as the target
287+ # server may have its own /textfile0.txt" file)
288+ And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
289+ And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
290+ And Using server "LOCAL"
291+ And User "user0" from server "LOCAL" accepts last pending share
292+ And as "user0" the file "/remote-share.txt" exists
293+ And Using server "REMOTE"
294+ When As an "user1"
295+ And Deleting last share
296+ Then the OCS status code should be "100"
297+ And the HTTP status code should be "200"
298+ # Received remote shares can not be checked using the share API controller;
299+ # that the file no longer exists needs to be checked instead.
300+ And Using server "LOCAL"
301+ And as "user0" the file "/remote-share.txt" does not exist
281302
303+ Scenario : Delete federate share from another server
304+ Given Using server "LOCAL"
305+ And user "user0" exists
306+ Given Using server "REMOTE"
307+ And user "user1" exists
308+ # Rename file so it has a unique name in the target server (as the target
309+ # server may have its own /textfile0.txt" file)
310+ And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
311+ And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
312+ And As an "user1"
313+ And sending "GET" to "/apps/files_sharing/api/v1/shares"
314+ And the list of returned shares has 1 shares
315+ And Using server "LOCAL"
316+ And User "user0" from server "LOCAL" accepts last pending share
317+ # Received remote shares can not be deleted using the share API controller;
318+ # the file needs to be deleted instead.
319+ When User "user0" deletes file "/remote-share.txt"
320+ Then the HTTP status code should be "204"
321+ And Using server "REMOTE"
322+ And As an "user1"
323+ And sending "GET" to "/apps/files_sharing/api/v1/shares"
324+ And the list of returned shares has 0 shares
282325
283-
284-
285-
286-
287-
288-
289-
290-
326+ Scenario : Delete federate share from another server no longer reachable
327+ Given Using server "LOCAL"
328+ And user "user0" exists
329+ Given Using server "REMOTE"
330+ And user "user1" exists
331+ # Rename file so it has a unique name in the target server (as the target
332+ # server may have its own /textfile0.txt" file)
333+ And User "user1" copies file "/textfile0.txt" to "/remote-share.txt"
334+ And User "user1" from server "REMOTE" shares "/remote-share.txt" with user "user0" from server "LOCAL"
335+ And Using server "LOCAL"
336+ And User "user0" from server "LOCAL" accepts last pending share
337+ And remote server is stopped
338+ # Received remote shares can not be deleted using the share API controller;
339+ # the file needs to be deleted instead.
340+ When User "user0" deletes file "/remote-share.txt"
341+ Then the HTTP status code should be "204"
0 commit comments