Skip to content

Conversation

@ScharfViktor
Copy link
Contributor

@ScharfViktor ScharfViktor commented Sep 24, 2025

Problem

https://ci.opencloud.eu/repos/3/pipeline/291/168

Scenario Outline: send share invitation to group with different roles                            # /woodpecker/src/github.com/opencloud-eu/opencloud/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" # SharingNgContext::userShouldHaveShareSharedByUserFromSpace()
    And user "Carol" should have a share "<resource>" shared by user "Alice" from space "Personal" # SharingNgContext::userShouldHaveShareSharedByUserFromSpace()

--------
    Examples:
      | permissions-role | resource       |
      | Viewer           | /textfile1.txt |
      | File Editor      | /textfile1.txt |
      | Viewer           | FolderToShare  |
      | Editor           | FolderToShare  |
      | Uploader         | 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.

user Brian hasn't mountpoint 'FolderToShare' because share is async -> need wait

==> 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/brian","driveType":"personal","id":"55163dc3-3a0a-45be-9a97-15316bdae90d$495dac4c-4b4e-464d-9dd0-a981f1b1e331","lastModifiedDateTime":"2025-09-24T06:41:40.958063583Z","name":"Brian Murphy","owner":{"user":{"displayName":"","id":"fc322c91-4971-46a9-9f8c-de881265e8ef"}},"quota":{"remaining":9223372036854775807,"state":"normal","total":0,"used":0},"root":{"eTag":"\"a96f9966db51d255e128966dd839f0c7\"","id":"55163dc3-3a0a-45be-9a97-15316bdae90d$495dac4c-4b4e-464d-9dd0-a981f1b1e331","webDavUrl":"https://opencloud-server:9200/dav/spaces/55163dc3-3a0a-45be-9a97-15316bdae90d$495dac4c-4b4e-464d-9dd0-a981f1b1e331"},"webUrl":"https://opencloud-server:9200/f/55163dc3-3a0a-45be-9a97-15316bdae90d$495dac4c-4b4e-464d-9dd0-a981f1b1e331"},{"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://opencloud-server:9200/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668"},"webUrl":"https://opencloud-server:9200/f/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668"}]}

Solution

added step And user "Brian" has a share "<resource>" synced to wait until share will be exist

@butonic butonic merged commit 93b02c2 into main Sep 24, 2025
45 of 46 checks passed
@butonic butonic deleted the fix-flaky-api-tests branch September 24, 2025 12:52
@openclouders openclouders mentioned this pull request Sep 24, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants