Skip to content

Added shared by multiple channels test - #20893

Merged
DeepDiver1975 merged 3 commits into
masterfrom
test_sharing_file_by_multiple_channels
Dec 10, 2015
Merged

DeepDiver1975 merged 3 commits into
masterfrom
test_sharing_file_by_multiple_channels

Conversation

@SergioBertolinSG

Copy link
Copy Markdown
Contributor

@PVince81 Please review. Currently it is working fine, shouldn't it fail?

@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @MorrisJobke to be a potential reviewer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you pick a range more in the middle like bytes=5-12 ?
Because not starting a 0 will cause a fseek()

@PVince81

PVince81 commented Dec 2, 2015

Copy link
Copy Markdown
Contributor

Otherwise it looks good.

Why would it fail ? Range requests always worked with Webdav before.

@SergioBertolinSG

Copy link
Copy Markdown
Contributor Author

Because this one is still open #20769

@PVince81

PVince81 commented Dec 2, 2015

Copy link
Copy Markdown
Contributor

Ah, understood. Let me check the case again.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of NULL, NULL something like [] should be enough (the last parameter is optional and the headers should be an array.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah...null for heders is okay-ish ... but then it maybe should be a default value to not be forced to pass it.

@PVince81

PVince81 commented Dec 2, 2015

Copy link
Copy Markdown
Contributor

Hmm, the case looks the same but the one difference is that I opened the file with the text editor and it was empty. You could also try and do a PROPFIND of the "{DAV:}getetag" property and see if it is not empty.

I'd need to recheck if downloading still delivers contents in this situation.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Beside my nitpicking this looks good 👍 from my side even if the not failing test case is weird.

@SergioBertolinSG

Copy link
Copy Markdown
Contributor Author

@PVince81 Adding the propfind requesting etag that file doesn't appear. Good.

@PVince81

PVince81 commented Dec 2, 2015

Copy link
Copy Markdown
Contributor

The test fails now, but because of another reason:

Notice: Undefined variable: elementList in /ssd/jenkins/workspace/ocs-api-integration-tests-ci/build/integration/features/bootstrap/WebDav.php line 116

@SergioBertolinSG

Copy link
Copy Markdown
Contributor Author

Damn, I erased a line before the commit. (Fixing..)

@SergioBertolinSG

Copy link
Copy Markdown
Contributor Author

@PVince81 Now failing because of the missing etag.

@SergioBertolinSG

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 is ok to merge tests which are failing because there are bugs?

Perhaps is better to merge this failing tests just before the bugs they test are going to be fixed.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Perhaps is better to merge this failing tests just before the bugs they test are going to be fixed.

No. We will not merge failing tests, because then we can't spot actual failures. cc @PVince81

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user2 should also check the file in /textfile0.txt

@MorrisJobke

Copy link
Copy Markdown
Contributor

--- Failed scenarios:

    /ssd/jenkins/workspace/ocs-api-integration-tests-ci/build/integration/features/sharing-v1.feature:382


  Scenario: Share a file by multiple channels                                          # /ssd/jenkins/workspace/ocs-api-integration-tests-ci/build/integration/features/sharing-v1.feature:382
    Given As an "admin"                                                                # FeatureContext::asAn()
    And user "user0" exists                                                            # FeatureContext::assureUserExists()
    And user "user1" exists                                                            # FeatureContext::assureUserExists()
    And user "user2" exists                                                            # FeatureContext::assureUserExists()
    And group "group0" exists                                                          # FeatureContext::assureGroupExists()
    And user "user1" belongs to group "group0"                                         # FeatureContext::assureUserBelongsToGroup()
    And user "user2" belongs to group "group0"                                         # FeatureContext::assureUserBelongsToGroup()
    And user "user0" created a folder "/common"                                        # FeatureContext::userCreatedAFolder()
    And user "user0" created a folder "/common/sub"                                    # FeatureContext::userCreatedAFolder()
    And file "common" of user "user0" is shared with group "group0"                    # FeatureContext::assureFileIsSharedWithGroup()
    And file "textfile0.txt" of user "user1" is shared with user "user2"               # FeatureContext::assureFileIsShared()
    And User "user1" moved file "/textfile0.txt" to "/common/textfile0.txt"            # FeatureContext::userMovedFile()
    And User "user1" moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt" # FeatureContext::userMovedFile()
    And As an "user2"                                                                  # FeatureContext::asAn()
    When Downloading file "/common/sub/textfile0.txt" with range "bytes=9-17"          # FeatureContext::downloadFileWithRange()
    Then Downloaded content should be "test text"                                      # FeatureContext::downloadedContentShouldBe()
    And user "user2" should see following elements                                     # FeatureContext::checkElementList()
      | /common/sub/textfile0.txt |
      /remote.php/webdav/common/sub/textfile0.txt is not in propfind answer

@MorrisJobke

Copy link
Copy Markdown
Contributor

@PVince81 I labeled this as "developing" because it needs a fix ;)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I noticed this will fail. Since the depth of your propfind is 2 by default. so this file will never get listed.

@rullzer
rullzer force-pushed the test_sharing_file_by_multiple_channels branch from 577c5c3 to 865c46b Compare December 7, 2015 14:01
@rullzer

rullzer commented Dec 7, 2015

Copy link
Copy Markdown
Contributor

I squashed and rebased the commits on top of my branch from #20989 so the tests should pass now

@SergioBertolinSG

Copy link
Copy Markdown
Contributor Author

👍 dd71a58

@rullzer
rullzer force-pushed the test_sharing_file_by_multiple_channels branch from 77a2ae5 to e758e7e Compare December 10, 2015 08:05
@rullzer rullzer added this to the 9.0-current milestone Dec 10, 2015
@rullzer

rullzer commented Dec 10, 2015

Copy link
Copy Markdown
Contributor

#20989 is merged.

Rebased this branch. Ready for review now.

SergioBertolinSG and others added 3 commits December 10, 2015 08:10
@SergioBertolinSG
SergioBertolinSG force-pushed the test_sharing_file_by_multiple_channels branch from e758e7e to 93f4524 Compare December 10, 2015 08:11
@MorrisJobke

Copy link
Copy Markdown
Contributor

👍

DeepDiver1975 added a commit that referenced this pull request Dec 10, 2015
…_channels

Added shared by multiple channels test
@DeepDiver1975
DeepDiver1975 merged commit 6ca9444 into master Dec 10, 2015
@DeepDiver1975
DeepDiver1975 deleted the test_sharing_file_by_multiple_channels branch December 10, 2015 09:36
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants