Add integration tests of invalid REST integer parameters.#1765
Merged
Conversation
This was referenced Aug 30, 2023
ab38a3e to
039c588
Compare
039c588 to
40cbc0f
Compare
8ec7783 to
ac939fb
Compare
ac939fb to
d37f79c
Compare
196b542 to
7f3d7f3
Compare
7f3d7f3 to
3e43fea
Compare
eiffel777
reviewed
Nov 29, 2023
3e43fea to
bfc6ad5
Compare
eiffel777
approved these changes
Dec 1, 2023
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.
Description
This PR adds new integration tests that test invalid integer parameters obtained via the
getIntParam()method ofBaseControllerProvider.This PR also fixes a bug in
DashboardControllerProviderin which an exception name was misspelled; this bug was exposed by the new tests.This PR also refactors some parameter validation in
WarehouseControllerProviderto be more consistent with parameter validation elsewhere.This PR is a basis for #1768.
Tests performed
I developed the tests incrementally while running in the
tools-ext-01.ccr.xdmod.org/xdmod10.0:rockylinux8.5-0.5Docker container upgraded to the latest XDMoD.Also, in a Docker container running
tools-ext-01.ccr.xdmod.org/xdmod-10.5.0-x86_64:rockylinux8.5-0.3:/before.txtand/after.txtand make sure the differences are correct:ControllerTest::testEnumTargetAddresses.AdminControllerProviderTest,DashboardControllerProviderTest, andWarehouseControllerProviderTest(the latter of which replaceWarehouseControllerProviderTest::testGetAggregateDataMalformedRequests).Checklist: