From Fedora Project Wiki

Description

Testing basic read-write management tasks like setting system properties

Setup

  1. Finish Add management user test case

How to test

  1. Become root
  2. Start JBoss AS service, type: systemctl start jboss-as.service
  3. Drop root privileges and become regular user
  4. Start JBoss AS CLI, type: jboss-cli
  5. Connect to the local server, type: connect
  6. Authenticate as a user created in Add management user test case
  7. Try to read non-existing system property: /system-property=foo:read-resource
  8. Try to add the property: /system-property=foo:add(value=bar)
  9. Try to read the property again: /system-property=foo:read-resource
  10. Try to remove the property again: /system-property=foo:remove
  11. Try to read the property again: /system-property=foo:read-resource

Expected Results

  1. You should be able to connect and authenticate
  2. Step 7 should fail to read the resource, see below for
  3. Step 8 should add the property
  4. Check that /etc/jboss-as/standalone/standalone-web.xml contains the relevant system property, see below for snippet
  5. Step 9 should print the value
  6. Step 10 should remove the property
  7. Check that /etc/jboss-as/standalone/standalone-web.xml doesn't contain the system property.
  8. 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
}