Uploaded image for project: 'OpenJDK'
  1. OpenJDK
  2. OPENJDK-2200

test coverage for user-provided run-env.sh

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      https://github.com/jboss-container-images/openjdk/issues/399 :

       
      openjdk/modules/run/artifacts/opt/jboss/container/java/run/run-java.sh

      Line 102 in d39eac6
       

      source "${JAVA_APP_DIR}/${run_env_sh}"

       

      The above code seems to suggest that a script named run-env.sh placed in $JAVA_APP_DIR (which defaults to /deployments) is sourced by the run script prior to launching java.

      I don't think we have any behave test coverage for this feature. Before we make changes to this code area, I would like to have coverage to first test that this actually works, and later it remains working after any future refactoring (e.g. in #397 )

      The test will need to perform an S2I build of a prepared application source, such that after the build, there is a run-env.sh script in $JAVA_APP_DIR which does something we can easily detect after starting the resulting container. A good candidate might be to set JAVA_APP_NAME=someCustomString, which should cause the final process name to be changed and that to be easily detected in container logs.

      The prepared application source will need to live somewhere. We used to use the following repository as a source of test application sources: https://github.com/jboss-openshift/openshift-quickstarts but we archived it this year for various reasons. See #400 for further details of that (which effectively blocks this issue)

       

              jhuttana1@redhat.com Jayashree Huttanagoudar
              jdowland@redhat.com Jonathan Dowland
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: