From Fedora Project Wiki
Description
Testing basic read-write management tasks like setting system properties
Setup
- Finish Add management user test case
How to test
- Become root
- Start JBoss AS service, type:
systemctl start jboss-as.service - Drop root privileges and become regular user
- Start JBoss AS CLI, type:
jboss-cli - Connect to the local server, type:
connect - Authenticate as a user created in Add management user test case
- Try to read non-existing system property:
/system-property=foo:read-resource - Try to add the property:
/system-property=foo:add(value=bar) - Try to read the property again:
/system-property=foo:read-resource - Try to remove the property again:
/system-property=foo:remove - Try to read the property again:
/system-property=foo:read-resource
Expected Results
- You should be able to connect and authenticate
- Step 7 should fail to read the resource, see below for
- Step 8 should add the property
- Check that
/etc/jboss-as/standalone/standalone-web.xmlcontains the relevant system property, see below for snippet - Step 9 should print the value
- Step 10 should remove the property
- Check that
/etc/jboss-as/standalone/standalone-web.xmldoesn't contain the system property. - Step 11 should fail like in step 7
standalone-web.xml
<system-properties>
<property name="foo" value="bar"/>
</system-properties>
Sample step 7 and 11 outcome
{
"outcome" => "failed",
"failure-description" => "JBAS014807: Management resource '[(\"system-property\" => \"foo\")]' not found",
"rolled-back" => true
}
