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 listing permissions with filters #10898

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

[QA] Flaky API tests while listing permissions with filters #10898

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

Comments

@anon-pradip
Copy link
Contributor

anon-pradip commented Jan 21, 2025

Describe the bug

builds: https://drone.owncloud.com/owncloud/ocis/42764/33/5

Scenario:

@env-config
Scenario: filter permissions of a file for Member user type (Personal space)                                                       # /drone/src/tests/acceptance/features/apiSharingNg1/filterPermissions.feature:352
Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"                                              # FeatureContext::userHasUploadedAFileWithContentTo()
And the administrator has enabled the permissions role "Secure Viewer"                                                           # OcisConfigContext::theAdministratorHasEnabledTheRole()
When user "Alice" lists permissions with following filters for file "textfile0.txt" of the space "Personal" using the Graph API: # SharingNgContext::userListsPermissionsWithFollowingFiltersForFileOrFolderOfTheSpaceUsingTheGraphApi()
| $filter=@libre.graph.permissions.roles.allowedValues/rolePermissions/any(p:contains(p/condition,+'@Subject.UserType=="Member"')) |

Request log:
==> REQUEST

	GET /dav/spaces/a4446c2c-9529-468f-ba41-93e98009ecf7$0ff8f82b-7a51-432a-9a1f-d6fbdd073393/textfile0.txt

	X-Request-ID: apiSharingNg1/filterPermissions.feature:571-574

	==> REQ BODY

	{}


	<== RESPONSE

	425 Too Early

	X-Xss-Protection: 1; mode=block

When user "Alice" lists permissions with following filters for file "textfile0.txt" of the space "Personal" using the Graph API: # SharingNgContext::userListsPermissionsWithFollowingFiltersForFileOrFolderOfTheSpaceUsingTheGraphApi()

      | [email protected]/rolePermissions/any(p:contains(p/condition,+'@Subject.UserType=="Federated"')) |

      │ ### RESPONSE

      │ Status: 425

      │ Headers:

      │ Content-Length: 0

      │ Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'

      │ Date: Mon, 20 Jan 2025 00:37:22 GMT

      │ Referrer-Policy: strict-origin-when-cross-origin

      │ Strict-Transport-Security: max-age=315360000; preload

      │ Vary: Origin

      │ X-Content-Type-Options: nosniff

      │ X-Frame-Options: SAMEORIGIN

      │ X-Permitted-Cross-Domain-Policies: none

      │ X-Request-Id: apiSharingNg1/filterPermissions.feature:108-111

      │ X-Robots-Tag: none

      │ X-Xss-Protection: 1; mode=block

      │ Body:

      │ string(0) ""



      │ ### END RESPONSE

      │ ### RESPONSE

      │ Status: 425

      │ Headers:

      │ Content-Length: 0

      │ Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'

      │ Date: Mon, 20 Jan 2025 00:37:23 GMT

      │ Referrer-Policy: strict-origin-when-cross-origin

      │ Strict-Transport-Security: max-age=315360000; preload

      │ Vary: Origin

      │ X-Content-Type-Options: nosniff

      │ X-Frame-Options: SAMEORIGIN

      │ X-Permitted-Cross-Domain-Policies: none

      │ X-Request-Id: apiSharingNg1/filterPermissions.feature:108-111

      │ X-Robots-Tag: none

      │ X-Xss-Protection: 1; mode=block

      │ Body:

      │ string(0) ""



      │ ### END RESPONSE

      │ ### RESPONSE

      │ Status: 425

      │ Headers:

      │ Content-Length: 0

      │ Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'

      │ Date: Mon, 20 Jan 2025 00:37:24 GMT

      │ Referrer-Policy: strict-origin-when-cross-origin

      │ Strict-Transport-Security: max-age=315360000; preload

      │ Vary: Origin

      │ X-Content-Type-Options: nosniff

      │ X-Frame-Options: SAMEORIGIN

      │ X-Permitted-Cross-Domain-Policies: none

      │ X-Request-Id: apiSharingNg1/filterPermissions.feature:108-111

      │ X-Robots-Tag: none

      │ X-Xss-Protection: 1; mode=block

      │ Body:

      │ string(0) ""



      │ ### END RESPONSE

      │ ### RESPONSE

      │ Status: 425

      │ Headers:

      │ Content-Length: 0

      │ Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'

      │ Date: Mon, 20 Jan 2025 00:37:25 GMT

      │ Referrer-Policy: strict-origin-when-cross-origin

      │ Strict-Transport-Security: max-age=315360000; preload

      │ Vary: Origin

      │ X-Content-Type-Options: nosniff

      │ X-Frame-Options: SAMEORIGIN

      │ X-Permitted-Cross-Domain-Policies: none

      │ X-Request-Id: apiSharingNg1/filterPermissions.feature:108-111

      │ X-Robots-Tag: none

      │ X-Xss-Protection: 1; mode=block

      │ Body:

      │ string(0) ""



      │ ### END RESPONSE

      │ ### RESPONSE

      │ Status: 425

      │ Headers:

      │ Content-Length: 0

      │ Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'

      │ Date: Mon, 20 Jan 2025 00:37:26 GMT

      │ Referrer-Policy: strict-origin-when-cross-origin

      │ Strict-Transport-Security: max-age=315360000; preload

      │ Vary: Origin

      │ X-Content-Type-Options: nosniff

      │ X-Frame-Options: SAMEORIGIN

      │ X-Permitted-Cross-Domain-Policies: none

      │ X-Request-Id: apiSharingNg1/filterPermissions.feature:108-111

      │ X-Robots-Tag: none

      │ X-Xss-Protection: 1; mode=block

      │ Body:

      │ string(0) ""



      │ ### END RESPONSE

      │ ### RESPONSE

      │ Status: 425

      │ Headers:

      │ Content-Length: 0

      │ Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'

      │ Date: Mon, 20 Jan 2025 00:37:27 GMT

      │ Referrer-Policy: strict-origin-when-cross-origin

      │ Strict-Transport-Security: max-age=315360000; preload

      │ Vary: Origin

      │ X-Content-Type-Options: nosniff

      │ X-Frame-Options: SAMEORIGIN

      │ X-Permitted-Cross-Domain-Policies: none

      │ X-Request-Id: apiSharingNg1/filterPermissions.feature:108-111

      │ X-Robots-Tag: none

      │ X-Xss-Protection: 1; mode=block

      │ Body:

      │ string(0) ""



      │ ### END RESPONSE

      │ ### RESPONSE

      │ Status: 425

      │ Headers:

      │ Content-Length: 0

      │ Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'

      │ Date: Mon, 20 Jan 2025 00:37:28 GMT

      │ Referrer-Policy: strict-origin-when-cross-origin

      │ Strict-Transport-Security: max-age=315360000; preload

      │ Vary: Origin

      │ X-Content-Type-Options: nosniff

      │ X-Frame-Options: SAMEORIGIN

      │ X-Permitted-Cross-Domain-Policies: none

      │ X-Request-Id: apiSharingNg1/filterPermissions.feature:108-111

      │ X-Robots-Tag: none

      │ X-Xss-Protection: 1; mode=block

      │ Body:

      │ string(0) ""



      │ ### END RESPONSE

      │ ### RESPONSE

      │ Status: 425

      │ Headers:

      │ Content-Length: 0

      │ Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'

      │ Date: Mon, 20 Jan 2025 00:37:29 GMT

      │ Referrer-Policy: strict-origin-when-cross-origin

      │ Strict-Transport-Security: max-age=315360000; preload

      │ Vary: Origin

      │ X-Content-Type-Options: nosniff

      │ X-Frame-Options: SAMEORIGIN

      │ X-Permitted-Cross-Domain-Policies: none

      │ X-Request-Id: apiSharingNg1/filterPermissions.feature:108-111

      │ X-Robots-Tag: none

      │ X-Xss-Protection: 1; mode=block

      │ Body:

      │ string(0) ""



      │ ### END RESPONSE

      │ ### RESPONSE

      │ Status: 425

      │ Headers:

      │ Content-Length: 0

      │ Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'

      │ Date: Mon, 20 Jan 2025 00:37:30 GMT

      │ Referrer-Policy: strict-origin-when-cross-origin

      │ Strict-Transport-Security: max-age=315360000; preload

      │ Vary: Origin

      │ X-Content-Type-Options: nosniff

      │ X-Frame-Options: SAMEORIGIN

      │ X-Permitted-Cross-Domain-Policies: none

      │ X-Request-Id: apiSharingNg1/filterPermissions.feature:108-111

      │ X-Robots-Tag: none

      │ X-Xss-Protection: 1; mode=block

      │ Body:

      │ string(0) ""



      │ ### END RESPONSE

      │ ### RESPONSE

      │ Status: 425

      │ Headers:

      │ Content-Length: 0

      │ Content-Security-Policy: child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'

      │ Date: Mon, 20 Jan 2025 00:37:31 GMT

      │ Referrer-Policy: strict-origin-when-cross-origin

      │ Strict-Transport-Security: max-age=315360000; preload

      │ Vary: Origin

      │ X-Content-Type-Options: nosniff

      │ X-Frame-Options: SAMEORIGIN

      │ X-Permitted-Cross-Domain-Policies: none

      │ X-Request-Id: apiSharingNg1/filterPermissions.feature:108-111

      │ X-Robots-Tag: none

      │ X-Xss-Protection: 1; mode=block

      │ Body:

      │ string(0) ""



      │ ### END RESPONSE



      Warning: Undefined array key "Oc-Fileid" in /drone/src/tests/acceptance/bootstrap/SpacesContext.php line 323

Setup

CI

@S-Panta
Copy link
Contributor

S-Panta commented Jan 23, 2025

@S-Panta
Copy link
Contributor

S-Panta commented Jan 23, 2025

Ocis server debug level shows:

2025/01/23 16:55:16 [ociswrapper] Stopping oCIS server...
2025/01/23 16:55:17 [ociswrapper] Restarting oCIS server...
{"level":"error","event":"PostprocessingFinished","uploadid":"6445bf39-7b2c-4453-ae1b-84d592935b7f","error":"ERR_UPLOAD_NOT_FOUND: upload not found","time":"2025-01-23T16:55:18+05:45","message":"Failed to get upload"}
{"level":"error","event":"PostprocessingFinished","uploadid":"6445bf39-7b2c-4453-ae1b-84d592935b7f","error":"ERR_UPLOAD_NOT_FOUND: upload not found","time":"2025-01-23T16:55:18+05:45","message":"Failed to get upload"}
2025/01/23 16:55:19 [ociswrapper] All services are up
2025/01/23 16:55:19 [ociswrapper] oCIS server is ready to accept requests

That immediately happens as ociswrapper is starting the server

Seems like test can even pass with this server logs sometime.

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

2 participants