shareAccessByID.feature return codes for invalid shares are different with Oracle and Postgresql
https://drone.owncloud.com/owncloud/core/34154/70/13
runsh: Total unexpected failed scenarios throughout the test run:
apiShareOperationsToShares2/shareAccessByID.feature:50
apiShareOperationsToShares2/shareAccessByID.feature:51
apiShareOperationsToShares2/shareAccessByID.feature:52
apiShareOperationsToShares2/shareAccessByID.feature:53
Scenario Outline: Get a share with an invalid share id # /drone/src/tests/acceptance/features/apiShareOperationsToShares2/shareAccessByID.feature:40
Given using OCS API version "<ocs_api_version>" # FeatureContext::usingOcsApiVersion()
When user "Alice" gets share with id "<share_id>" using the sharing API # FeatureContext::userGetsTheLastShareWithTheShareIdUsingTheSharingApi()
Then the OCS status code should be "404" # OCSContext::theOCSStatusCodeShouldBe()
And the HTTP status code should be "<http_status_code>" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
And the API should not return any data # FeatureContext::theApiShouldNotReturnAnyData()
Examples:
| ocs_api_version | share_id | http_status_code |
| 1 | 2333311 | 200 |
| 2 | 2333311 | 404 |
| 1 | helloshare | 200 |
OCS status code is not any of the expected values 404 got 996
Failed asserting that an array contains '996'.
| 2 | helloshare | 404 |
OCS status code is not any of the expected values 404 got 500
Failed asserting that an array contains '500'.
| 1 | $#@r3 | 200 |
OCS status code is not any of the expected values 404 got 996
Failed asserting that an array contains '996'.
| 2 | $#@r3 | 404 |
OCS status code is not any of the expected values 404 got 500
Failed asserting that an array contains '500'.
| 1 | 0 | 200 |
| 2 | 0 | 404 |
Other tests for accessing share by valid share id are passing. So the happy-path is OK.
When trying to access an invalid/non-existent share id, with MariaDb/MySQL, we get the expected 404 "not found". But with Oracle we get various 996 and 500 codes. So something different is going wrong in this case.
PR #39637 demonstrates the failure.
The same happens with Postgresql 9.4 https://drone.owncloud.com/owncloud/core/34194/70/13
PR #39659
And fails with Postgresql 10.3 https://drone.owncloud.com/owncloud/core/34195/70/13
PR #39660
This still happens, see https://github.com/owncloud/core/pull/39755#issuecomment-1031210487