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 unnecessary validator tests #288

Merged
merged 2 commits into from
Oct 18, 2019
Merged

remove unnecessary validator tests #288

merged 2 commits into from
Oct 18, 2019

Conversation

loshz
Copy link
Member

@loshz loshz commented Oct 18, 2019

Description

I have reworked the ValidatorTest struct to open the auth file only when needed as opposed to holding a file open in memory.

I also deleted 2 test files as they didn't seem to test any business logic, only renaming/replacing files (please double check this)

Motivation and Context

#287

How Has This Been Tested?

Tests passing CI.

Checklist:

  • My change requires a change to the documentation or CHANGELOG.
  • I have updated the documentation/CHANGELOG accordingly.
  • I have created a feature (non-master) branch for my PR.

@loshz loshz requested a review from a team October 18, 2019 00:18
Copy link
Member

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

I think the tests removed are redundant and the updated tests make sense, happy to merge as is if you are?

@loshz
Copy link
Member Author

loshz commented Oct 18, 2019

I think the way this previously held an open file in memory could sometimes cause an issue, as some of the tests didn't check if the file was closed before performing operations.

@loshz loshz merged commit 9d0a0c7 into oauth2-proxy:master Oct 18, 2019
@loshz loshz deleted the validator-test-rework branch October 18, 2019 15:49
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.

2 participants