-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Improve our approach for testing auth (part 2) - basicAuth #9983
base: master
Are you sure you want to change the base?
Commits on Oct 23, 2023
-
improve stackexchange auth testing
Change auth tests to include all shields of the base class. The code is formated to be used in more general cases and increases code reuseability.
Configuration menu - View commit details
-
Copy full SHA for 764582e - Browse repository at this point
Copy the full SHA 764582eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e913a7 - Browse repository at this point
Copy the full SHA 2e913a7View commit details
Commits on Jan 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ae1a231 - Browse repository at this point
Copy the full SHA ae1a231View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2c2a18 - Browse repository at this point
Copy the full SHA b2c2a18View commit details
Commits on Jan 16, 2024
-
We already test all existing classes, no need for a dummy
Configuration menu - View commit details
-
Copy full SHA for 9dd597d - Browse repository at this point
Copy the full SHA 9dd597dView commit details
Commits on Jan 20, 2024
-
Add getBadgeExampleCall to test-helpers
Add getBadgeExampleCall to extract the first OpenAPI example then reformat it for service invoke function.
Configuration menu - View commit details
-
Copy full SHA for 7bc3cc0 - Browse repository at this point
Copy the full SHA 7bc3cc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for f6da3af - Browse repository at this point
Copy the full SHA f6da3afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 31c3f94 - Browse repository at this point
Copy the full SHA 31c3f94View commit details -
Add the testAuth function which tests auth of a service (badge) using a provided dummy response.
Configuration menu - View commit details
-
Copy full SHA for 18ec387 - Browse repository at this point
Copy the full SHA 18ec387View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1688e58 - Browse repository at this point
Copy the full SHA 1688e58View commit details -
Configuration menu - View commit details
-
Copy full SHA for 609c017 - Browse repository at this point
Copy the full SHA 609c017View commit details
Commits on Feb 10, 2024
-
Add all auth methods to testAuth
Add all auth methods used to testAuth to be generic and used by all services. Add helper functions to make testAuth more readable
Configuration menu - View commit details
-
Copy full SHA for ffc7800 - Browse repository at this point
Copy the full SHA ffc7800View commit details
Commits on Feb 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3e5c98d - Browse repository at this point
Copy the full SHA 3e5c98dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 876708f - Browse repository at this point
Copy the full SHA 876708fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ddd577 - Browse repository at this point
Copy the full SHA 1ddd577View commit details -
Configuration menu - View commit details
-
Copy full SHA for c41f60f - Browse repository at this point
Copy the full SHA c41f60fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f4cc1af - Browse repository at this point
Copy the full SHA f4cc1afView commit details -
Configuration menu - View commit details
-
Copy full SHA for b471c5c - Browse repository at this point
Copy the full SHA b471c5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7aadc10 - Browse repository at this point
Copy the full SHA 7aadc10View commit details
Commits on Feb 13, 2024
-
Use apiHeaderKey and bearerHeaderKey function params
Use apiHeaderKey & bearerHeaderKey as function params rather then extracting them with regex from function strings. Those options are now part of an options object param joined with the contentType that replaces header. header was originaly added for setting content type of the reply, so it makes more sense to directly set the content type
Configuration menu - View commit details
-
Copy full SHA for 79dc536 - Browse repository at this point
Copy the full SHA 79dc536View commit details -
Configuration menu - View commit details
-
Copy full SHA for d1435c2 - Browse repository at this point
Copy the full SHA d1435c2View commit details
Commits on Feb 16, 2024
-
Allow any pass & user key for QueryStringAuth
Before this commit the QueryStringAuth would only work for the key of stackexchange. This commit makes the testAuth function generic and allows passing user and pass keys.
Configuration menu - View commit details
-
Copy full SHA for a53f716 - Browse repository at this point
Copy the full SHA a53f716View commit details -
Configuration menu - View commit details
-
Copy full SHA for 14d0789 - Browse repository at this point
Copy the full SHA 14d0789View commit details -
Fix wrong header for jwt login
Might set wrong header for jwt login request. This commit fixes that.
Configuration menu - View commit details
-
Copy full SHA for d22de8a - Browse repository at this point
Copy the full SHA d22de8aView commit details -
Support multiple authOrigins in testAuth
Some services might have more then one authOrigin. This commit makes sure we test for redundent authOrigins as well as support requests to them if needed.
Configuration menu - View commit details
-
Copy full SHA for 50f4144 - Browse repository at this point
Copy the full SHA 50f4144View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d310bd - Browse repository at this point
Copy the full SHA 2d310bdView commit details
Commits on Feb 17, 2024
-
Fix JwtAuth testing by introducing mandatory jwtLoginEndpoint
Prior to this change, JwtAuth testing would lead to erros due to the absence of a specified login endpoint, Nock would be dumplicated for both login and non login hosts and indicate a missing request. This commit enforces the requirement for a new jwtLoginEndpoint argument when testing JwtAuth. The argument seperates the endpoint nock scope from the behavior of the request nock.
Configuration menu - View commit details
-
Copy full SHA for 1b79b4c - Browse repository at this point
Copy the full SHA 1b79b4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 419bd01 - Browse repository at this point
Copy the full SHA 419bd01View commit details
Commits on Feb 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a2b838c - Browse repository at this point
Copy the full SHA a2b838cView commit details
Commits on Feb 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2590482 - Browse repository at this point
Copy the full SHA 2590482View commit details -
Add exampleOverride to testAuth
Introduce `exampleOverride` to test authentication scenarios. Allows providing custom examples for testAuth via an object. Simulates service requests that trigger desiered condition paths in tests.
Configuration menu - View commit details
-
Copy full SHA for 4d57607 - Browse repository at this point
Copy the full SHA 4d57607View commit details
Commits on Feb 24, 2024
-
Some classes can change the auth based on badge inputs. This parameter allows the flexability of overriding the default auth for testing those cases.
Configuration menu - View commit details
-
Copy full SHA for f156762 - Browse repository at this point
Copy the full SHA f156762View commit details -
Add configOverride to testAuth
Some tests might require non default config for cases where these are set. This allows creating tests for those cases.
Configuration menu - View commit details
-
Copy full SHA for cd6c65b - Browse repository at this point
Copy the full SHA cd6c65bView commit details -
Fix example params by split into path and query
Splits testAuth example params into path and query params. Introduce paramType to getBadgeExampleCall
Configuration menu - View commit details
-
Copy full SHA for cf34fae - Browse repository at this point
Copy the full SHA cf34faeView commit details -
Refactor BitbucketPullRequest for testAuth
Refactor to add auth static properties. for better integration with testAuth. Refactor bitbucketpullrequest for testAuth
Configuration menu - View commit details
-
Copy full SHA for 8adaf3d - Browse repository at this point
Copy the full SHA 8adaf3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 988290d - Browse repository at this point
Copy the full SHA 988290dView commit details -
Configuration menu - View commit details
-
Copy full SHA for b9d51d1 - Browse repository at this point
Copy the full SHA b9d51d1View commit details
Commits on Feb 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b23e3d4 - Browse repository at this point
Copy the full SHA b23e3d4View commit details
Commits on Mar 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 84bee80 - Browse repository at this point
Copy the full SHA 84bee80View commit details
Commits on Mar 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1c15782 - Browse repository at this point
Copy the full SHA 1c15782View commit details -
Improve error handling in getServiceClassAuthOrigin
Enhance reliability by throwing a TypeError when a service key definition is missing. It's common for a key to be missing and might require the developer that writes tests to provide a fake on that fits the examples used. Key changes: - Added a check for missing service key definitions in getServiceClassAuthOrigin. - Throws a TypeError with a clear message if the key is not found. - Guides devs to use an override if needed which is often.
Configuration menu - View commit details
-
Copy full SHA for a713669 - Browse repository at this point
Copy the full SHA a713669View commit details -
Fix edge case in testAuth for user only auth
Addresses a scenario where generateFakeConfig/testAuth would fail for classes using auth.userKey without auth.passKey. Ensures proper handling of user-specific authentication even if a password key is not present. Throws a TypeError only when both fakeKey and fakeUser are missing. Better fit for AuthHelper behivor.
Configuration menu - View commit details
-
Copy full SHA for 99a01e1 - Browse repository at this point
Copy the full SHA 99a01e1View commit details -
Add option to not import openApi example in testAuth
Added for services without openApi examples. Dev can use example override to add example inputs in those cases.
Configuration menu - View commit details
-
Copy full SHA for 74554d7 - Browse repository at this point
Copy the full SHA 74554d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b8bf19 - Browse repository at this point
Copy the full SHA 8b8bf19View commit details
Commits on Mar 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a2b5331 - Browse repository at this point
Copy the full SHA a2b5331View commit details -
Configuration menu - View commit details
-
Copy full SHA for 87c68e2 - Browse repository at this point
Copy the full SHA 87c68e2View commit details
Commits on Mar 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8c38355 - Browse repository at this point
Copy the full SHA 8c38355View commit details -
Add support for multiple requests in testAuth function
Some services might have more then one request to auth with the server for the same shield. This commit adds support for those requests in testAuth using the new multipleRequests option.
Configuration menu - View commit details
-
Copy full SHA for 57163eb - Browse repository at this point
Copy the full SHA 57163ebView commit details
Commits on Apr 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5dc774a - Browse repository at this point
Copy the full SHA 5dc774aView commit details -
Missing return for async mocha tests caused the tests to run async and throw errors of one test in another. This commit makes sure all testAuth tests return a promise to mocha for it to await.
Configuration menu - View commit details
-
Copy full SHA for 1b425aa - Browse repository at this point
Copy the full SHA 1b425aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 94a479a - Browse repository at this point
Copy the full SHA 94a479aView commit details
Commits on Jun 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ee75674 - Browse repository at this point
Copy the full SHA ee75674View commit details -
Remove ignoreOpenApiExample option in testAuth function
The `ignoreOpenApiExample` option in the `testAuth` function is no longer needed and has been removed. This option was used to ignore OpenAPI examples for classes without OpenAPI, but it is no longer necessary as the function now handles this case correctly. BaseService defines by dafault empty object for openApi so if nothing is set we expect empty obj. Warn devs about missing openApi as openApi is standard for services now.
Configuration menu - View commit details
-
Copy full SHA for 263aba7 - Browse repository at this point
Copy the full SHA 263aba7View commit details -
handle extraction of openApi boolean examples
Improve authTest by handeling boolean example extractions. Remove example override not needed after this change.
Configuration menu - View commit details
-
Copy full SHA for 669d913 - Browse repository at this point
Copy the full SHA 669d913View commit details
Commits on Jun 12, 2024
-
Use static headers in base service classes and remove contentType opt…
…ion from testAuth Refactor the base service classes (BaseGraphqlService, BaseJsonService, BaseSvgScrapingService, BaseTomlService, BaseXmlService, BaseYamlService) to use static headers for access from other function to header types. Remove testAuth contentType option and use the new headers veriable to extract headers insted.
Configuration menu - View commit details
-
Copy full SHA for 625042e - Browse repository at this point
Copy the full SHA 625042eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 059b8ca - Browse repository at this point
Copy the full SHA 059b8caView commit details
Commits on Oct 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9e58dde - Browse repository at this point
Copy the full SHA 9e58ddeView commit details -
Update jenkinsCoverage response
Example changed at 62ed7c3 The new example schema differ from old one This caused test to fail Update example response to fit new schema
Configuration menu - View commit details
-
Copy full SHA for 73b3e14 - Browse repository at this point
Copy the full SHA 73b3e14View commit details -
remove BitbucketPullReuqest tests
remove for adding these changes in a later PR. this test adds the authOverride we try to get rid of. This blocks testAuth development and is planned for a later time.
Configuration menu - View commit details
-
Copy full SHA for 1fdf395 - Browse repository at this point
Copy the full SHA 1fdf395View commit details