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

Remove /ocs/ from end of acceptance tests baseUrl #30943

Merged
merged 1 commit into from
Mar 29, 2018

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Mar 28, 2018

Description

  1. Set baseUrl in the API acceptance tests to no longer have /ocs/ on the end of it.
  2. Provide convenience methods to return the baseUrl with an without a trailing slash.
  3. Everywhere that used to do stuff like substr($this->baseUrl, 0, -5) now use the method to get baseUrl
  4. Update webUI test code so it consistently uses baseUrl from the API FeatureContext and does not keep trying to get it from getMinkParameter("base_url")

Related Issue

#30879
owncloud/QA#517

Motivation and Context

Bring API and UI acceptance tests even closer together. By using a common format for baseUrl it will be easier to make a common script for running any acceptance test.

How Has This Been Tested?

Locally and CI

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Test refactoring

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@phil-davis phil-davis self-assigned this Mar 28, 2018
@phil-davis phil-davis changed the title Remove /ocs/ from end of acceptance tests baseUrl [WIP] Remove /ocs/ from end of acceptance tests baseUrl Mar 28, 2018
@codecov
Copy link

codecov bot commented Mar 28, 2018

Codecov Report

Merging #30943 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             master   #30943    +/-   ##
==========================================
  Coverage     62.28%   62.28%            
+ Complexity    18396    18233   -163     
==========================================
  Files          1141     1141            
  Lines         68154    68154            
  Branches       1232     1232            
==========================================
  Hits          42449    42449            
  Misses        25344    25344            
  Partials        361      361
Flag Coverage Δ Complexity Δ
#javascript 52.04% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 63.45% <ø> (ø) 18233 <ø> (-163) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b629020...22ce7b2. Read the comment docs.

@phil-davis phil-davis force-pushed the acceptance-test-baseURL branch 2 times, most recently from aba1092 to 7bc5975 Compare March 28, 2018 13:51
@phil-davis phil-davis added this to the development milestone Mar 28, 2018
@phil-davis phil-davis changed the title [WIP] Remove /ocs/ from end of acceptance tests baseUrl Remove /ocs/ from end of acceptance tests baseUrl Mar 28, 2018
@@ -122,7 +125,7 @@ public function __construct(
) {

// Initialize your context here
$this->baseUrl = $baseUrl;
$this->baseUrl = rtrim($baseUrl, '/');
Copy link
Contributor Author

@phil-davis phil-davis Mar 28, 2018

Choose a reason for hiding this comment

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

These rtrim() are here for the benefit of future users. If they pass in the baseURL parameter with a / on the end, then we will cope with that.

@phil-davis
Copy link
Contributor Author

Backport stable10 #30953

Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

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

👍 if CI passes

@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 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.

2 participants