X Tutup
Skip to content

Acceptance tests for groups excluded from sharing and sharee information#33731

Merged
PVince81 merged 2 commits intofix/api-sharees-securityfrom
test/api-sharees-security
Dec 3, 2018
Merged

Acceptance tests for groups excluded from sharing and sharee information#33731
PVince81 merged 2 commits intofix/api-sharees-securityfrom
test/api-sharees-security

Conversation

@phil-davis
Copy link
Contributor

Add acceptance test scenarios that exclude a group from sharing, then for a user in that group:

  1. try to request possible sharees for a string that could have multiple matches in users and groups

In current master this test case fails with:

    Examples:
      | ocs-api-version | ocs-status | http-status |
      | 1               | 100        | 200         |
        'users' array should be empty, but it starts with Sharee One (sharee1)
        Failed asserting that an array is empty.
      | 2               | 200        | 200         |
        'users' array should be empty, but it starts with Sharee One (sharee1)
        Failed asserting that an array is empty.

--- Failed scenarios:

    /home/phil/git/owncloud/core/tests/acceptance/features/apiSharees/sharees.feature:277
    /home/phil/git/owncloud/core/tests/acceptance/features/apiSharees/sharees.feature:278
  1. try to request possible sharees for a string that could exactly match a user

In current master this test case fails with:

    Examples:
      | ocs-api-version | ocs-status | http-status |
      | 1               | 100        | 200         |
        'exact users' array should be empty, but it starts with Sharee One (sharee1)
        Failed asserting that an array is empty.
      | 2               | 200        | 200         |
        'exact users' array should be empty, but it starts with Sharee One (sharee1)
        Failed asserting that an array is empty.

--- Failed scenarios:

    /home/phil/git/owncloud/core/tests/acceptance/features/apiSharees/sharees.feature:297
    /home/phil/git/owncloud/core/tests/acceptance/features/apiSharees/sharees.feature:298
  1. try to request possible sharees for a string that could exactly match a group

In current master this test case fails with:

    Examples:
      | ocs-api-version | ocs-status | http-status |
      | 1               | 100        | 200         |
        'exact groups' array should be empty, but it starts with ShareeGroup (ShareeGroup)
        Failed asserting that an array is empty.
      | 2               | 200        | 200         |
        'exact groups' array should be empty, but it starts with ShareeGroup (ShareeGroup)
        Failed asserting that an array is empty.

--- Failed scenarios:

    /home/phil/git/owncloud/core/tests/acceptance/features/apiSharees/sharees.feature:317
    /home/phil/git/owncloud/core/tests/acceptance/features/apiSharees/sharees.feature:318

2 scenarios (2 failed)
32 steps (24 passed, 2 failed, 6 skipped)

All test scenarios pass when run with the corrected code in PR #33728

Copy link
Contributor

@micbar micbar left a comment

Choose a reason for hiding this comment

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

Thank you! This is the first acceptance test, that i see in action.
The logic is correct. It it more important than the unit test, as it it hard to cover everything there.

@micbar micbar force-pushed the fix/api-sharees-security branch from ffc9039 to 6613855 Compare December 3, 2018 16:36
@PVince81 PVince81 merged commit b3e3b0f into fix/api-sharees-security Dec 3, 2018
@delete-merged-branch delete-merged-branch bot deleted the test/api-sharees-security branch December 3, 2018 16:49
@lock lock bot locked as resolved and limited conversation to collaborators Dec 3, 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.

3 participants

X Tutup