PageRenderTime 48ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/runtime/esb-manage/regress/jbiadmin00015.ksh

https://bitbucket.org/openesb/openesb-core
Korn Shell | 84 lines | 29 code | 18 blank | 37 comment | 0 complexity | bbf2f8600654f8fe62d4738d2157d6cd MD5 | raw file
  1. #!/bin/sh
  2. #
  3. # BEGIN_HEADER - DO NOT EDIT
  4. #
  5. # The contents of this file are subject to the terms
  6. # of the Common Development and Distribution License
  7. # (the "License"). You may not use this file except
  8. # in compliance with the License.
  9. #
  10. # You can obtain a copy of the license at
  11. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  12. # See the License for the specific language governing
  13. # permissions and limitations under the License.
  14. #
  15. # When distributing Covered Code, include this CDDL
  16. # HEADER in each file and include the License file at
  17. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  18. # If applicable add the following below this CDDL HEADER,
  19. # with the fields enclosed by brackets "[]" replaced with
  20. # your own identifying information: Portions Copyright
  21. # [year] [name of copyright owner]
  22. #
  23. #
  24. # @(#)jbiadmin00015.ksh
  25. # Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
  26. #
  27. # END_HEADER - DO NOT EDIT
  28. #
  29. ####
  30. # This tests SA redeployment with standalone instance as the target
  31. # SA with two SUs is deployed the first time. SU1 is successful and SU2
  32. # deployment fails because component throws exception on deploy.
  33. # The bad component is uninstalled and a corrected component with the same name
  34. # is installed and deployment is attempted and is successful.
  35. # This tests redeployment after partial deployment.
  36. # Redeployment is again attempted to test redeployment after successful deployment.
  37. ####
  38. echo "jbiadmin00015 : Test SA redeployment in instance."
  39. . ./regress_defs.ksh
  40. ant -q -emacs -DESBMEMBER_ADMIN_PORT="$JBI_ADMIN_PORT" -lib "$REGRESS_CLASSPATH" -f jbiadmin00014.xml 1>&2
  41. echo install the good component test-component1
  42. 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
  43. echo install the bad component, test-component2 that throws on deploy.
  44. 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
  45. echo deploy SA deployment - will be partial success because su1 is deployed and su2 is not deployed
  46. 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
  47. echo redeploy SA - will be partial success because su1 is already deployed and su2 will not be deployed
  48. 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
  49. echo redeploy SA - this would fail because SA contents are not identical
  50. 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
  51. echo shut-down the bad component - this would have been started by autostart
  52. asadmin shut-down-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component2
  53. echo uninstall the bad component
  54. asadmin uninstall-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component2
  55. echo install the corrected component with the same name
  56. 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
  57. echo redeploy the sa - redeploy after partial deploy
  58. 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
  59. echo redeploy the sa - redeploy after successful deploy
  60. 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
  61. echo cleanup
  62. asadmin undeploy-jbi-service-assembly --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-sa-for-redeploy
  63. asadmin shut-down-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component2
  64. asadmin uninstall-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component2
  65. asadmin shut-down-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component1
  66. asadmin uninstall-jbi-component --target=instance1 --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component1