core icon indicating copy to clipboard operation
core copied to clipboard

[tests-only][full-ci] Change oC selector for http requests before step execution (Parallel deployment)

Open saw-jan opened this issue 2 years ago • 6 comments

Description

In this PR, I have implemented a way to run API tests with different matrices (server combination for Given-When-Then steps) for oc10-ocis parallel deployment setup.

For example, Given steps can be run with oC10 server, When steps with oCIS server and same goes for Then steps.

To achieve this feature, the function beforeEachStepChangeOCSelector has been added which runs before every test step, determines the step type, and sets the server selector in the requests.

Server selector for each step type is set through env variables: GIVEN_OC_SELECTOR WHEN_OC_SELECTOR THEN_OC_SELECTOR

Related Issue

Part of https://github.com/owncloud/ocis/issues/2932

Motivation and Context

How Has This Been Tested?

  • test environment: CI

Screenshots (if appropriate):

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Database schema changes (next release will require increase of minor version instead of patch)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Technical debt
  • [x] Tests only (no source changes)

Checklist:

  • [ ] Code changes
  • [ ] Unit tests added
  • [ ] Acceptance tests added
  • [ ] Documentation ticket raised:
  • [ ] Changelog item, see TEMPLATE

saw-jan avatar May 27 '22 10:05 saw-jan

~Blocked until https://github.com/owncloud/ocis/issues/2932#issuecomment-1144587011~

saw-jan avatar Jun 02 '22 08:06 saw-jan

:boom: Acceptance tests pipeline apiProxySmoke-8-3-mariadb10.2-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/core/36044/180

ownclouders avatar Jun 15 '22 11:06 ownclouders

@saw-jan is this ready for review? or?

phil-davis avatar Jul 04 '22 08:07 phil-davis

@saw-jan is this ready for review? or?

I thought to make it ready for review only after all the tests running in parallel deployment are looked through. Because some changes might need to be done.

saw-jan avatar Jul 05 '22 09:07 saw-jan

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarcloud[bot] avatar Jul 19 '22 09:07 sonarcloud[bot]

As of now, tests for parallel deployment are not of higher priority. I will put this on the backlog.

saw-jan avatar Aug 01 '22 06:08 saw-jan

tests are moved to oCIS repo: https://github.com/owncloud/ocis/pull/5280 So these changes should be done in oCIS now.

saw-jan avatar Jan 30 '23 05:01 saw-jan