[ADMINAPI-1448] Increase unit tests coverage in all unit tests V2/V3#392
Open
josephcampos-gap wants to merge 39 commits into
Open
[ADMINAPI-1448] Increase unit tests coverage in all unit tests V2/V3#392josephcampos-gap wants to merge 39 commits into
josephcampos-gap wants to merge 39 commits into
Conversation
Contributor
Test Results 15 files 15 suites 1m 8s ⏱️ Results for commit b0c676f. ♻️ This comment has been updated with latest results. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…mSetEditor Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…, and V2/V3 application commands Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… sweep Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3ad1f74 to
d2f2c62
Compare
…overage tracker Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…plication, ReadClaimSets Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ance, V3 DataStore Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…adClaimSets V3 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ication V3 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…r, EditDataStore V3 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…Context, EditResourceClaimActions validator Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…r V2, CopyClaimSet V3 handler tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…etCommand InMemory test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…aims V2+V3, ReadOdsInstance handler tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…emaining gaps, and new issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…erage Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds new and comprehensive unit tests for several core features in the Admin API, focusing on applications, authorization strategies, API client validation, and multi-tenancy middleware. The new tests improve coverage for validators, command handlers, and mapping logic, ensuring more robust validation and correct behavior across these components.
Unit tests for application features:
AddApplicationandEditApplicationvalidators to check for required fields, maximum lengths, and valid IDs. This includes new test classesAddApplicationValidatorTestsandEditApplicationValidatorTests. [1] [2]DeleteApplicationhandler to verify the delete command is executed and exceptions are handled.ResetApplicationCredentialshandler to ensure it throws a validation exception when the endpoint is disabled.Unit tests for authorization strategies:
AuthorizationStrategyMapperto verify correct mapping from data models to API models and preservation of list order.ReadAuthorizationStrategyto ensure the query returns correctly mapped strategies and proper HTTP results.Improvements to API client validation:
AddApiClientValidatorTestsandEditApiClientValidatorTeststo ensure validation errors are raised whenOdsInstanceIdsis null, in addition to when it is empty. [1] [2]Unit tests for multi-tenancy middleware:
TenantResolverMiddleware, covering scenarios such as valid and invalid tenant headers, missing headers, Swagger requests, and V1 mode bypasses.