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

Add Tests for checking auth through app passwords and token #36616

Merged
merged 1 commit into from
Dec 19, 2019

Conversation

dpakach
Copy link
Contributor

@dpakach dpakach commented Dec 19, 2019

Description

Add Tests for checking auth through app passwords and token

  • Check authentication when multiple app passwords are generated
  • Check that deleteting an app password removes it and authentication using that password is not possibloe
  • Check that using the app password as token and regular password in all the webDav endpoints works as expected

Related Issue

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)
  • 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
  • Tests only (no source changes)

Checklist:

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

@phil-davis
Copy link
Contributor

@dpakach https://drone.owncloud.com/owncloud/core/22113/32/12

Behat\Testwork\Call\Exception\FatalThrowableError: Fatal error: Cannot use object of type Behat\Gherkin\Node\TableNode as array in /drone/src/tests/acceptance/features/bootstrap/Auth.php:207

@codecov
Copy link

codecov bot commented Dec 19, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #36616   +/-   ##
=========================================
  Coverage     64.68%   64.68%           
  Complexity    19071    19071           
=========================================
  Files          1268     1268           
  Lines         74522    74522           
  Branches       1312     1312           
=========================================
  Hits          48207    48207           
  Misses        25930    25930           
  Partials        385      385
Flag Coverage Δ Complexity Δ
#javascript 54.05% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.86% <ø> (ø) 19071 <ø> (ø) ⬇️

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 41b46f7...7924d65. Read the comment docs.

Copy link
Contributor

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

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

Only a few word to change in comments. I will do these in a next PR that reformats a bunch of other stuff in feature files...

@@ -74,6 +79,16 @@ public function getAppToken() {
return $this->appToken;
}

/**
* get the app token that was last generated
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* get the app token that was last generated
* get the app tokens that were last generated

}

/**
* Use the private API to generate an app password
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Use the private API to generate an app password
* Use the private API to delete an app password

@phil-davis phil-davis merged commit f86da41 into master Dec 19, 2019
@delete-merged-branch delete-merged-branch bot deleted the token-auth-tests branch December 19, 2019 15:58
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.

2 participants