Skip to content

Add cli tests for config file values#35269

Merged
paurakhsharma merged 1 commit into
masterfrom
cli-Test-configKey
May 23, 2019
Merged

Add cli tests for config file values#35269
paurakhsharma merged 1 commit into
masterfrom
cli-Test-configKey

Conversation

@paurakhsharma

Copy link
Copy Markdown
Contributor

Description

Add cli tests for checking config.php default values.

Related Issue

#31347

Motivation and Context

How Has This Been Tested?

🤖

Screenshots (if appropriate):

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)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Comment thread tests/acceptance/features/bootstrap/OccContext.php Outdated
Comment thread tests/acceptance/features/bootstrap/OccContext.php Outdated
@paurakhsharma
paurakhsharma requested a review from dpakach May 20, 2019 11:26
@codecov

codecov Bot commented May 20, 2019

Copy link
Copy Markdown

Codecov Report

Merging #35269 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #35269      +/-   ##
============================================
- Coverage     65.54%   65.53%   -0.01%     
  Complexity    18647    18647              
============================================
  Files          1218     1218              
  Lines         70546    70545       -1     
  Branches       1288     1288              
============================================
- Hits          46236    46234       -2     
- Misses        23933    23934       +1     
  Partials        377      377
Flag Coverage Δ Complexity Δ
#javascript 53.69% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.9% <ø> (-0.01%) 18647 <ø> (ø)
Impacted Files Coverage Δ Complexity Δ
...eratedfilesharing/lib/Controller/OcmController.php 66.06% <0%> (-0.21%) 30% <0%> (ø)
lib/private/Server.php 86.57% <0%> (-0.12%) 253% <0%> (ø)

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 c0dc3cd...2c144f6. Read the comment docs.

@codecov

codecov Bot commented May 20, 2019

Copy link
Copy Markdown

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #35269   +/-   ##
=========================================
  Coverage     65.54%   65.54%           
  Complexity    18647    18647           
=========================================
  Files          1218     1218           
  Lines         70546    70546           
  Branches       1288     1288           
=========================================
  Hits          46236    46236           
  Misses        23933    23933           
  Partials        377      377
Flag Coverage Δ Complexity Δ
#javascript 53.69% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.9% <ø> (ø) 18647 <ø> (ø) ⬇️

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 6db604e...20149a7. Read the comment docs.

@paurakhsharma
paurakhsharma force-pushed the cli-Test-configKey branch 2 times, most recently from 6e9e1cc to 42a42d7 Compare May 21, 2019 07:48
Comment thread tests/acceptance/features/bootstrap/OccContext.php Outdated
Comment thread tests/acceptance/features/bootstrap/OccContext.php Outdated
$system_config = $config_list['system'];
$configArray = $system_config[$key];

foreach ($configArray as $innerConfigArray) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Guiding comments please .....

http://antirez.com/news/124

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@skshetry Please have a look at the comments.

@paurakhsharma
paurakhsharma force-pushed the cli-Test-configKey branch 2 times, most recently from 2c9315d to 3604510 Compare May 21, 2019 11:22

@skshetry skshetry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread tests/acceptance/features/cliMain/configKey.feature Outdated
Comment thread tests/acceptance/features/bootstrap/OccContext.php
increment the foundCount value
Note: all the values from the tableNode should be present inside the same
config array that's why foundCount is used */
if ($innerConfigArray[$value['key']] === $value['value']) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we could delete from the table the found keys and then the ones that are not found will be left over, so the error can show which one were not found

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that seems to be the better way.

Comment thread tests/acceptance/features/bootstrap/OccContext.php Outdated
Comment thread tests/acceptance/features/cliMain/configKey.feature Outdated
@individual-it

Copy link
Copy Markdown
Member

@paurakhsharma please backport and mark in #35207

@paurakhsharma
paurakhsharma merged commit 3c1b91c into master May 23, 2019
@delete-merged-branch
delete-merged-branch Bot deleted the cli-Test-configKey branch May 23, 2019 11:24
@paurakhsharma

Copy link
Copy Markdown
Contributor Author

Backport on: #35320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants