Uncomment test cases in dataProviderForCompleteAuthorization()

Created on 14 January 2025, 3 months ago

Problem/Motivation

A number of test cases are commented-out in OpenIDConnectTest::dataProviderForCompleteAuthorization() with the following explanation:

      // @todo Fix these test cases. At the moment, they throw an exception
      // due to an unknown config get.

Not having these test cases enabled blocks us from testing some changes, e.g. πŸ› No email is sent to administrator when account approval is needed Active . I've been working on enabling them. So far I've fixed the initial problem mentioned in that comment as well as a few other bugs with the test. At the moment there's only one failure remaining.

πŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dcam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dcam
  • Merge request !136Enable test cases β†’ (Merged) created by dcam
  • Pipeline finished with Failed
    3 months ago
    Total: 349s
    #395015
  • Pipeline finished with Success
    3 months ago
    Total: 197s
    #396054
  • πŸ‡ΊπŸ‡ΈUnited States dcam

    Test case 9 had a couple of problems:

    • It seemed to be trying to test two different things:
      • A blocked existing user
      • A mismatch in the sub property

      The test path was not compatible with doing this. The "mismatch" case results in an early return, but then the test path expected function calls related to the blocked user. I had to make the assumption that these cases should be tested separately. It's difficult to know whether they should since there's no labels or comments on the test cases to know what the original intent was. Based on the current completeAuthorization() code it makes sense to me that they should not be tested together. I split the "mismatch" case into a new 10th test case.

    • The test path was not set up to test for the sub mismatch.
  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States pfrilling Minster, OH

    I fixed the deprecations that were flagged for the next minor. I think this looks good.

  • πŸ‡ΊπŸ‡ΈUnited States pfrilling Minster, OH

    Merged the PR. Thanks for getting those tests enabled!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024