Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] [full-ci] Run API tests from ocis repo (master) #3592

Merged
merged 6 commits into from
Jan 25, 2023

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Jan 9, 2023

  1. Bump CORE_COMMITID for API tests (get it up-to-date and passing first
  2. run the API tests out of the owncloud/ocis repo

The API test code and feature files was moved to owncloud/ocis in PR owncloud/ocis#5280

The original API test code in owncloud/core will no longer be guaranteed to support reva/ocis special settings etc. So we will be better to run the API test code that is in owncloud/ocis

Note: this has also been done in edge PR #3591

@phil-davis phil-davis self-assigned this Jan 9, 2023
@phil-davis phil-davis force-pushed the run-api-tests-from-ocis-master branch from 3bb489e to 3d31283 Compare January 9, 2023 12:00
@phil-davis phil-davis marked this pull request as ready for review January 9, 2023 12:18
@phil-davis phil-davis requested review from labkode, gmgigi96, glpatcern and a team as code owners January 9, 2023 12:18
individual-it
individual-it previously approved these changes Jan 10, 2023
@saw-jan
Copy link
Contributor

saw-jan commented Jan 10, 2023

Need to bring back --remote related code in the run.sh

@phil-davis
Copy link
Contributor Author

Need to bring back --remote related code in the run.sh

Hmmm - this stuff passed in reva edge branch, which has --remote mentioned in Makefile. I suppose that it is ignored (does nothing special any more), but it passes anyway.

I pushed a commit to remove --remote here, just to see what happens. I suspect that it will still fail.

@phil-davis
Copy link
Contributor Author

phil-davis commented Jan 10, 2023

I pushed a commit to remove --remote here, just to see what happens. I suspect that it will still fail.

It passed. That's good :)

For future reference, the failing pipeline was https://drone.owncloud.com/cs3org/reva/173/3/5

BEHAT_BIN=vendor-bin/behat/vendor/bin/behat /drone/src/tmp/testrunner/tests/acceptance/run.sh --remote --type api
Script path: /drone/src/tmp/testrunner/tests/acceptance
basename: unrecognized option '--remote'
Try 'basename --help' for more information.
Running apiVirtualViews tests tagged @api&&~@skip
Using behat config 'tests/acceptance/config/behat.yml'

In ArgvInput.php line 220:
                                                        
  [Symfony\Component\Console\Exception\RuntimeException]  
  The "--remote" option does not exist.                   

run.sh no longer needs or processes the --remote option. The option does not get removed during the processing of the command line, and ends being "accidentally" used as an option to basename at some point in the script. That explodes, of course.

--remote used to "tell" the test scripts that the system-under-test is really "remote', meaning that the backend of the system-under-test is not accessible by the front-end test code. Taht is, the test code cannot "cheat" and try to look locally for uploaded files to "appear" in the backend of the file-system of the system-under-test. And the test code cannot expect to have a "testing" app available on the system-under-test. Now that we have moved the test code to the ocis repo, the test code always behaves as --remote - we only use the test code to test ocis or reva. So we stop specifying --remote

individual-it
individual-it previously approved these changes Jan 10, 2023
@phil-davis
Copy link
Contributor Author

phil-davis commented Jan 10, 2023

@labkode @glpatcern @gmgigi96 I have touched some file that needs special approval (maybe Makefile is the one)

Please review/approve/merge.

@phil-davis
Copy link
Contributor Author

@labkode @glpatcern @gmgigi96 ping

@phil-davis phil-davis force-pushed the run-api-tests-from-ocis-master branch from ffe44f6 to 9089cc6 Compare January 23, 2023 03:50
@phil-davis
Copy link
Contributor Author

@labkode @glpatcern @gmgigi96 ping again - please review/approve/merge.

Copy link
Member

@glpatcern glpatcern left a comment

Choose a reason for hiding this comment

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

Apologies for the delay, we reviewed this with @vascoguita as we are also evolving the CI. Hopefully if we get drone fully functional as well we should be all good.

@glpatcern glpatcern merged commit 74afdca into cs3org:master Jan 25, 2023
@phil-davis phil-davis deleted the run-api-tests-from-ocis-master branch January 26, 2023 05:00
@phil-davis
Copy link
Contributor Author

Note: this change did not change the tests that are run, or how many pipelines are run etc.
It just changed the source of the test scenarios and test code, because we moved all that into the owncloud/ocis repository.

@vascoguita
Copy link
Contributor

@phil-davis Is it possible to use only owncloud/ocis?
I see that the virtualViews test uses owncloud/ocis now but s3ngIntegrationTests and the ocisIntegrationTests are still using owncloud/core.

@phil-davis
Copy link
Contributor Author

Is it possible to use only owncloud/ocis?

I am not sure what you mean. .drone.star cloneApiTestReposStep()` has:

"git clone -b $APITESTS_BRANCH --single-branch --no-tags https://github.com/owncloud/ocis.git /drone/src/tmp/testrunner",

The feature files and test code are cloned from owncloud/ocis for all the acceptance test pipelines.

@vascoguita
Copy link
Contributor

Indeed, everything moved to owncloud/ocis. Please ignore my comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants