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

CUSTCOM-75 Fix Payara System Property REST API #4497

Merged
merged 5 commits into from Feb 21, 2020

Conversation

@MattGill98
Copy link
Member

MattGill98 commented Feb 17, 2020

Description

This is a bug fix.

This change allows instance property overrides to be created without deleting all the other instance properties by using the REST endpoint correctly. It also allows empty property fields to be submitted to remove the property.

Firstly the PUT and POST methods were the wrong way around, so they've been swapped. Secondly, the POST method didn't allow empty fields, which meant that instance property overrides couldn't be removed. To stop this, empty properties are now treated as properties to be removed.

Testing

Testing Performed

Setting up domain with:

asadmin copy-config default-config test-config
asadmin create-instance --node localhost-domain1 --config test-config instance1
asadmin create-system-properties --target instance1 ASADMIN_LISTENER_PORT=12345
asadmin create-system-properties --target instance1 HTTP_LISTENER_PORT=23456

From the admin console tried:

  • removing an instance property from test-config -> system-properties -> instance values
  • creating an instance property from test-config -> system-properties -> instance values
  • removing an instance property from instances -> instance1 -> properties
  • creating an instance property from instances -> instance1 -> properties

Test suites executed

N/A

MattGill98 added 2 commits Feb 17, 2020
This change allows instance property overrides to be created without
deleting all the other instance properties by using the REST endpoint
correctly. It also allows empty property fields to be submitted to
remove the property.

Firstly the PUT and POST methods were the wrong way around, so they've
been swapped. Secondly, the POST method didn't allow empty fields, which
meant that instance property overrides couldn't be removed. To stop
this, empty properties are now treated as properties to be removed.

Signed-off-by: Matt Gill <matthew.gill@live.co.uk>
Added some javadocs for the class methods, and made a minor refactor to
one method signature.

Signed-off-by: Matt Gill <matthew.gill@live.co.uk>
@MattGill98 MattGill98 self-assigned this Feb 17, 2020
The page title didn't have the parameter filled.

Signed-off-by: Matt Gill <matthew.gill@live.co.uk>
Copy link
Contributor

MarkWareham left a comment

LGTM

@MattGill98 MattGill98 requested a review from MarkWareham Feb 20, 2020
MattGill98 added 2 commits Feb 20, 2020
The @NotMicroCompatible and @SincePayara annotations should be inherited
when abstract test classes are annotated with them.

Signed-off-by: Matt Gill <matthew.gill@live.co.uk>
This commit adds a set of tests for the system-properties endpoint of
the REST management interface, to make sure that it responds correctly
to PUT and POST requests.

An arquillian extension has been added to allow temporary instances to
be created for the purposes of tests.

Signed-off-by: Matt Gill <matthew.gill@live.co.uk>
@MattGill98 MattGill98 force-pushed the MattGill98:CUSTCOM-75 branch from 7f59e47 to 10e241b Feb 20, 2020
@MattGill98

This comment has been minimized.

Copy link
Member Author

MattGill98 commented Feb 20, 2020

jenkins test please

@MattGill98 MattGill98 requested a review from AlanRoth Feb 21, 2020
@MattGill98 MattGill98 merged commit a35a12b into payara:master Feb 21, 2020
58 checks passed
58 checks passed
Payara Quick Build and Test Quick build and test passed!
Details
security/snyk - api/payara-api/pom.xml (payara-ci) No new issues
Details
security/snyk - api/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/admin/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/admingui/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ant-tasks/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/appclient/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/batch/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/common/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/concurrent/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/connectors/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/core/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/deployment/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/distributions/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ejb/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/extras/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/featuresets/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/flashlight/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/grizzly/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ha/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/installer/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/jdbc/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/jms/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/load-balancer/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/orb/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/osgi-platforms/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/packager/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/payara-appserver-modules/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/persistence/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/registration/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/resources/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/security/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/tests/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/transaction/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/web/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/webservices/pom.xml (payara-ci) No new issues
Details
security/snyk - copyright/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/admin/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/cluster/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/common/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/core/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/deployment/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/diagnostics/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/distributions/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/flashlight/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/grizzly/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/hk2/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/osgi-platforms/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/packager/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/payara-modules/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/resources-l10n/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/resources/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/security/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/test-utils/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/tests/pom.xml (payara-ci) No new issues
Details
security/snyk - pom.xml (payara-ci) No new issues
Details
@dmatej
dmatej approved these changes Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.