/runtime/esb-manage/regress/jbiadmin00015.ksh
Korn Shell | 84 lines | 29 code | 18 blank | 37 comment | 0 complexity | bbf2f8600654f8fe62d4738d2157d6cd MD5 | raw file
- #!/bin/sh
- #
- # BEGIN_HEADER - DO NOT EDIT
- #
- # The contents of this file are subject to the terms
- # of the Common Development and Distribution License
- # (the "License"). You may not use this file except
- # in compliance with the License.
- #
- # You can obtain a copy of the license at
- # https://open-esb.dev.java.net/public/CDDLv1.0.html.
- # See the License for the specific language governing
- # permissions and limitations under the License.
- #
- # When distributing Covered Code, include this CDDL
- # HEADER in each file and include the License file at
- # https://open-esb.dev.java.net/public/CDDLv1.0.html.
- # If applicable add the following below this CDDL HEADER,
- # with the fields enclosed by brackets "[]" replaced with
- # your own identifying information: Portions Copyright
- # [year] [name of copyright owner]
- #
- #
- # @(#)jbiadmin00015.ksh
- # Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
- #
- # END_HEADER - DO NOT EDIT
- #
- ####
- # This tests SA redeployment with standalone instance as the target
- # SA with two SUs is deployed the first time. SU1 is successful and SU2
- # deployment fails because component throws exception on deploy.
- # The bad component is uninstalled and a corrected component with the same name
- # is installed and deployment is attempted and is successful.
- # This tests redeployment after partial deployment.
- # Redeployment is again attempted to test redeployment after successful deployment.
- ####
- echo "jbiadmin00015 : Test SA redeployment in instance."
- . ./regress_defs.ksh
- ant -q -emacs -DESBMEMBER_ADMIN_PORT="$JBI_ADMIN_PORT" -lib "$REGRESS_CLASSPATH" -f jbiadmin00014.xml 1>&2
- echo install the good component test-component1
- asadmin install-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT $JV_SVC_TEST_CLASSES/dist/test-component1.jar
- echo install the bad component, test-component2 that throws on deploy.
- asadmin install-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT $JV_SVC_TEST_CLASSES/dist/test-component2.jar
- echo deploy SA deployment - will be partial success because su1 is deployed and su2 is not deployed
- asadmin deploy-jbi-service-assembly --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT $JV_SVC_TEST_CLASSES/dist/test-sa-for-redeploy.jar
- echo redeploy SA - will be partial success because su1 is already deployed and su2 will not be deployed
- asadmin deploy-jbi-service-assembly --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT $JV_SVC_TEST_CLASSES/dist/test-sa-for-redeploy.jar
- echo redeploy SA - this would fail because SA contents are not identical
- asadmin deploy-jbi-service-assembly --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT $JV_SVC_TEST_CLASSES/dist/test-sa-for-redeploy-not-identical.jar
- echo shut-down the bad component - this would have been started by autostart
- asadmin shut-down-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component2
- echo uninstall the bad component
- asadmin uninstall-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component2
- echo install the corrected component with the same name
- asadmin install-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT $JV_SVC_TEST_CLASSES/dist/test-component2-corrected.jar
- echo redeploy the sa - redeploy after partial deploy
- asadmin deploy-jbi-service-assembly --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT $JV_SVC_TEST_CLASSES/dist/test-sa-for-redeploy.jar
- echo redeploy the sa - redeploy after successful deploy
- asadmin deploy-jbi-service-assembly --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT $JV_SVC_TEST_CLASSES/dist/test-sa-for-redeploy.jar
- echo cleanup
- asadmin undeploy-jbi-service-assembly --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-sa-for-redeploy
- asadmin shut-down-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component2
- asadmin uninstall-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component2
- asadmin shut-down-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component1
- asadmin uninstall-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component1