Uploaded image for project: 'Cloud Enablement'
  1. Cloud Enablement
  2. CLOUD-1848

[ce-ci] "Management interface is secured and JAVA_OPTS is modified" test broken

XMLWordPrintable

    • CLOUD Maintenance Sprint 10

      The test

       Scenario: Management interface is secured and JAVA_OPTS is modified
          When container is started with env
             | variable                    | value             |
             | ADMIN_USERNAME          | admin2            |
             | ADMIN_PASSWORD          | lollerskates11$   |
             | JAVA_OPTS_APPEND            | -Dfoo=bar         |
          Then container log should contain WFLYSRV0025
           And run /opt/eap/bin/jboss-cli.sh -c --error-on-interact --no-local-auth --user=admin2 --password=lollerskates11$ deployment-info in container once
           # We expect this command to fail, so make sure the return code is zero, we're interested only in output here
           And run /opt/eap/bin/jboss-cli.sh -c --error-on-interact --no-local-auth deployment-info || true in container and immediately check its output does not contain activemq-rar
           And container log should contain -Dfoo=bar
      

      should be failing, as in the current EAP7 image, the management port is not secured even when ADMIN_USERNAME / ADMIN_PASSWORD is set.

      The test however passes, as can be seen in the log

      2017-06-28 06:41:04,451 - ctf.steps.container - INFO - Preparing to execute '/opt/eap/bin/jboss-cli.sh -c --error-on-interact --no-local-auth deployment-info || true' command in 'Management interface is secured and JAVA_OPTS is modified' container
      2017-06-28 06:41:04,451 - ctf.steps.container - INFO - Executing command just once...
      And run /opt/eap/bin/jboss-cli.sh -c --error-on-interact --no-local-auth deployment-info || true in container and immediately check its output does not contain activemq-rar # steps/container_steps.py:180
      2017-06-28 06:41:05,324 - ctf.steps.container - DEBUG - Return code: 1, captured execute output: Picked up JAVA_TOOL_OPTIONS: -Duser.home=/home/jboss -Duser.name=jboss
      '||' is assumed to be a command(s) but the commands to execute have been specified by another argument: [deployment-info]

      And container log should contain -Dfoo=bar # steps/container_steps.py:23
      2017-06-28 06:41:05,351 - root - INFO - Message '-Dfoo=bar' was found in the logs

      because of the "||' is assumed...", the command does return 1 , thus so it throws an exception, thus

      @then(u'run {cmd} in container and immediately check its output does not contain {output_phrase}')
      def run_command_immediately_unexpect_message(context, cmd, output_phrase):
          try:
              run_command_expect_message(context, cmd, output_phrase, 0)
          except:
              return True
      

      returns True

              wdecoste1@redhat.com William Decoste (Inactive)
              maschmid@redhat.com Marek Schmidt
              Marek Schmidt Marek Schmidt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: