Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QA] Flaky API tests while checking shared resource #10897

Open
anon-pradip opened this issue Jan 21, 2025 · 2 comments
Open

[QA] Flaky API tests while checking shared resource #10897

anon-pradip opened this issue Jan 21, 2025 · 2 comments
Labels

Comments

@anon-pradip
Copy link
Contributor

anon-pradip commented Jan 21, 2025

Describe the bug

API tests are failing in this step:
And user "Brian" should have a share "<resource>" shared by user "Alice" from space "Personal"
And user "Brian" should have a share "FolderToShare" shared by user "Alice" from space "NewSpace"

Builds:

Scenario:

Scenario Outline: send share invitation to group with different roles                            # /drone/src/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature:100
    Given user "Carol" has been created with default attributes                                    # FeatureContext::userHasBeenCreatedWithDefaultAttributes()
    And group "grp1" has been created                                                              # FeatureContext::groupHasBeenCreated()
    And the following users have been added to the following groups                                # FeatureContext::theFollowingUserHaveBeenAddedToTheFollowingGroup()
      | username | groupname |
      | Brian    | grp1      |
      | Carol    | grp1      |
    And user "Alice" has uploaded file with content "to share" to "/textfile1.txt"                 # FeatureContext::userHasUploadedAFileWithContentTo()
    And user "Alice" has created folder "FolderToShare"                                            # FeatureContext::userHasCreatedFolder()
    When user "Alice" sends the following resource share invitation using the Graph API:           # SharingNgContext::userSendsTheFollowingResourceShareInvitationUsingTheGraphApi()
      | resource        | <resource>         |
      | space           | Personal           |
      | sharee          | grp1               |
      | shareType       | group              |
      | permissionsRole | <permissions-role> |
    Then the HTTP status code should be "200"                                                      # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And user "Brian" should have a share "<resource>" shared by user "Alice" from space "Personal"
...
    Examples:
      | permissions-role | resource       |
      | Viewer           | FolderToShare  |
        Failed step: And user "Brian" should have a share "FolderToShare" shared by user "Alice" from space "Personal"
        Share mountpoint 'FolderToShare' was not found in the drives list.
        Failed asserting that false is identical to true.

Request log:

### When user "Alice" sends the following resource share invitation using the Graph API:
	_______________________________________________________________________

	==> REQUEST
	GET /graph/v1.0/me/drives
	Content-Type: application/x-www-form-urlencoded

	<== RESPONSE
	200 OK
	X-Xss-Protection: 1; mode=block
	<== RES BODY
	{"value":[{"driveAlias":"personal/alice","driveType":"personal","id":"f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02","lastModifiedDateTime":"2025-01-20T05:51:41.803704389Z","name":"Alice Hansen","owner":{"user":{"displayName":"","id":"a2a8b8fe-18f3-4701-933b-a80258b8ea02"}},"quota":{"remaining":9223372036854775807,"state":"normal","total":0,"used":8},"root":{"eTag":"\"c2934f6583a9931f7aac29e704658bf3\"","id":"f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02","webDavUrl":"https://ocis-server:9200/dav/spaces/f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02"},"webUrl":"https://ocis-server:9200/f/f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02"},{"driveAlias":"virtual/shares","driveType":"virtual","id":"a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668","name":"Shares","root":{"eTag":"DECAFC00FEE","id":"a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668","webDavUrl":"https://ocis-server:9200/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668"},"webUrl":"https://ocis-server:9200/f/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668"}]}

	_______________________________________________________________________

	==> REQUEST
	GET /graph/v1.0/me/drives
	Content-Type: application/x-www-form-urlencoded

	<== RESPONSE
	200 OK
	X-Xss-Protection: 1; mode=block
	<== RES BODY
	{"value":[{"driveAlias":"personal/alice","driveType":"personal","id":"f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02","lastModifiedDateTime":"2025-01-20T05:51:41.803704389Z","name":"Alice Hansen","owner":{"user":{"displayName":"","id":"a2a8b8fe-18f3-4701-933b-a80258b8ea02"}},"quota":{"remaining":9223372036854775807,"state":"normal","total":0,"used":8},"root":{"eTag":"\"c2934f6583a9931f7aac29e704658bf3\"","id":"f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02","webDavUrl":"https://ocis-server:9200/dav/spaces/f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02"},"webUrl":"https://ocis-server:9200/f/f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02"},{"driveAlias":"virtual/shares","driveType":"virtual","id":"a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668","name":"Shares","root":{"eTag":"DECAFC00FEE","id":"a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668","webDavUrl":"https://ocis-server:9200/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668"},"webUrl":"https://ocis-server:9200/f/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668"}]}

	_______________________________________________________________________

	==> REQUEST
	PROPFIND /remote.php/dav/spaces/f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02/FolderToShare
	X-Request-ID: apiSharingNgShareInvitation/shareInvitations.feature:186-109

	<== RESPONSE
	207 Multi-Status
	X-Xss-Protection: 1; mode=block
	<== RES BODY
	<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/remote.php/dav/spaces/f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02/FolderToShare/</d:href><d:propstat><d:prop><oc:id>f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02!5bc264e5-9b6f-4601-b31c-7cbf800c4ee9</oc:id><oc:fileid>f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02!5bc264e5-9b6f-4601-b31c-7cbf800c4ee9</oc:fileid><oc:spaceid>f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02</oc:spaceid><oc:file-parent>f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02!a2a8b8fe-18f3-4701-933b-a80258b8ea02</oc:file-parent><oc:name>FolderToShare</oc:name><d:displayname>FolderToShare</d:displayname><d:getetag>"24b006d91eccd7d9cf5841cc3fa67866"</d:getetag><oc:permissions>RDNVCKZP</oc:permissions><d:resourcetype><d:collection/></d:resourcetype><oc:size>0</oc:size><d:getlastmodified>Mon, 20 Jan 2025 05:51:41 GMT</d:getlastmodified><oc:tags></oc:tags><oc:favorite>0</oc:favorite></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><oc:audio></oc:audio><oc:location></oc:location><oc:image></oc:image><oc:photo></oc:photo></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>

	_______________________________________________________________________

	==> REQUEST
	POST /graph/v1beta1/drives/f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02/items/f2f9fbb0-c1dd-44af-85d5-de8998bba858$a2a8b8fe-18f3-4701-933b-a80258b8ea02!5bc264e5-9b6f-4601-b31c-7cbf800c4ee9/invite
	X-Request-ID: apiSharingNgShareInvitation/shareInvitations.feature:186-109
	==> REQ BODY
	{"recipients":[{"@libre.graph.recipient.type":"group","objectId":"2d754ac7-1ffb-4aa2-b452-77cdec01a135"}],"roles":["b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5"]}

	<== RESPONSE
	200 OK
	X-Xss-Protection: 1; mode=block
	<== RES BODY
	{"value":[{"createdDateTime":"2025-01-20T05:51:42.129372515Z","grantedToV2":{"group":{"displayName":"grp1","id":"2d754ac7-1ffb-4aa2-b452-77cdec01a135"}},"id":"f2f9fbb0-c1dd-44af-85d5-de8998bba858:a2a8b8fe-18f3-4701-933b-a80258b8ea02:c2c37d7c-41d8-46de-abfc-50d04889e932","invitation":{"invitedBy":{"user":{"@libre.graph.userType":"Member","displayName":"Alice Hansen","id":"a2a8b8fe-18f3-4701-933b-a80258b8ea02"}}},"roles":["b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5"]}]}

### Then the HTTP status code should be "200"
### And user "Brian" should have a share "FolderToShare" shared by user "Alice" from space "Personal"
	_______________________________________________________________________

	==> REQUEST
	GET /graph/v1.0/me/drives
	Content-Type: application/x-www-form-urlencoded

	<== RESPONSE
	200 OK
	X-Xss-Protection: 1; mode=block
	<== RES BODY
	{"value":[{"driveAlias":"virtual/shares","driveType":"virtual","id":"a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668","name":"Shares","root":{"eTag":"DECAFC00FEE","id":"a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668","webDavUrl":"https://ocis-server:9200/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668"},"webUrl":"https://ocis-server:9200/f/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668"},{"driveAlias":"personal/brian","driveType":"personal","id":"f2f9fbb0-c1dd-44af-85d5-de8998bba858$e6fa7026-273e-449c-a06f-9037928cdc58","lastModifiedDateTime":"2025-01-20T05:51:41.066613919Z","name":"Brian Murphy","owner":{"user":{"displayName":"","id":"e6fa7026-273e-449c-a06f-9037928cdc58"}},"quota":{"remaining":9223372036854775807,"state":"normal","total":0,"used":0},"root":{"eTag":"\"b99c4b54578994607d77415dd2fbfa67\"","id":"f2f9fbb0-c1dd-44af-85d5-de8998bba858$e6fa7026-273e-449c-a06f-9037928cdc58","webDavUrl":"https://ocis-server:9200/dav/spaces/f2f9fbb0-c1dd-44af-85d5-de8998bba858$e6fa7026-273e-449c-a06f-9037928cdc58"},"webUrl":"https://ocis-server:9200/f/f2f9fbb0-c1dd-44af-85d5-de8998bba858$e6fa7026-273e-449c-a06f-9037928cdc58"}]}

Setup

CI

Additional context

Those might be failing because the sync time is too long

@anon-pradip
Copy link
Contributor Author

  • Tried locally continuously for 45 times (using small zsh script file) → no failures
  • Checked the recent CIs → no similar failures found till now

@anon-pradip
Copy link
Contributor Author

anon-pradip commented Jan 22, 2025

CI will be continuously monitored. Removing myself from assignee for now.

@anon-pradip anon-pradip removed their assignment Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant