-
Notifications
You must be signed in to change notification settings - Fork 5
Split old public API webdav tests from new public webdav tests #282
Comments
probably the easiest would be to create a second file, one for old and one for new, tagging example tables is not possible (there is a PR for that in behat, but no progress on reviewing it Behat/Gherkin#161) |
Seems there are also tests that read the previews with publicpreview.php, I'll also tag those in owncloud/core#37552. They should use the "/public-files" with the file name suffix. |
I saw in another file that the separation was done already by duplicating the scenarios. I managed to make a vim macro to replace all the blocks as they all have the same syntax. |
For example, If we have copy each scenario twice, then we have to. But it does create a maintenance issue when people adjust scenarios - making the matching updates is not always done 100% |
I agree, this is not optimal. At least when the scenarios are in the same file it makes it easier to spot them. But looks ugly. |
another idea would be to have this driven with config/env vars: basically running all the existing/known suites using a given API version. this would make it possible also to run them in parallel without scenario duplication. |
Actually this should be quite easy to do, and I will just think of some
And that step can set the default OCS API version from some environment variable. That will make it clear in the feature file And I can adjust |
@phil-davis sounds like a good idea. |
remaining tests to split:
and the following will likely require #11 to be solved first, still good to split soon:
|
after splitting we'll likely discover either that more is working / can be enabled, or more bugs to raise or tag... |
These are single scenarios (not Scenario Outline with Examples table). The step:
ends up in I guess that is an "old" "private" endpoint, and there is a new official public endpoint for getting the preview of a file in a public link share. @PVince81 when you say "to split", in this case do you mean "to add and engineer a new scenario that tests the official public endpoint", and so that new scenario could be run on both oC10 and OCIS? |
Yeah, that private endpoint is very very old. Even in the OC time frame back then we switched to Webdav-based previews, so I'm not sure if we should still cover that legacy endpoint. Might need to check with clients before removing. The Webdav based preview approach should work for both regular and public files IIRC. The approach is the one where you specify the Webdav path to a file and append some URL parameters to tell it to return the preview instead. In the case of OCIS it is possible that the ocis-thumbnails service does not return previews yet, but that would be another issue to raise/tag once the splitting is done. |
with splitting I mean keeping the old legacy and also add the new one, if that makes sense. otherwise we could also simply rewrite that utility function to use the Webdav approach for retrieving previews. |
currently blocked by various ideas how to improve skipping tests etc. see https://jira.owncloud.com/browse/OCIS-217 |
I can make a proof-of-concept for the ideas in https://jira.owncloud.com/browse/OCIS-217 - basically:
The idea is to make the core scenarios be more of an independent test suite that "defines" the expected behavior of the API. And "child" repos can themselves easily adjust the scenarios that they skip, and make local "replacement" scenarios that demonstrate their current local "odd" behavior. The aim is to reduce or eliminate the need for adjusting lots of scenario tags in core that need to be coordinated constantly with the state of the code in all the "child" repos. |
I am working on finishing implementation of owncloud/core#37717 |
what is left to do here? |
Now we have But it would be nice to not ever even run scenarios for old APIs that are not to be implemented on OCIS. At the moment, we do that by tagging them That means:
If we could get Behat/Gherkin#161 merged and released in Thinking... |
AFAIK OCIS will only implement the new public webdav endpoint ("/public-webdav") as the old one "public.php/webdav" is deprecated.
@butonic please confirm
Many of the API tests are combining calls to old and new API within the same scenario, for example https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature#L32
We need to split these cases in a way that we can disable old public webdav API tests for OCIS (with
@skipOnOcis
). Not sure if this needs a copy-paste of the whole test or whether we can disable "Examples" with tags.This is needed so that we can enable new public webdav API tests for OCIS as part of #49
To find the related tests please grep for
@issue-ocis-reva-282
@individual-it
The text was updated successfully, but these errors were encountered: