PageRenderTime 27ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://bitbucket.org/rsaqc/openesb-core
Korn Shell | 88 lines | 24 code | 15 blank | 49 comment | 1 complexity | 932bf1c4c3cb98735153ff8b5a162940 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. # @(#)jbiadmin00136.ksh
  25. # Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
  26. #
  27. # END_HEADER - DO NOT EDIT
  28. #
  29. echo "jbiadmin00136 : Test partial service assembly deployment ( Fix for CR 6514320 )"
  30. #############################################################################################
  31. # Tests deploying a service assembly. One component fails deploy, the #
  32. # deployment result should show the error for the failed deployment. #
  33. # #
  34. # A test component used throws an exception on deploy of a service unit #
  35. # #
  36. # The test : #
  37. # (a) Package, install and start the test components #
  38. # (b) Deploy the service assembly, deploy should be a partial success, SUCCESS with #
  39. # WARNING response expected #
  40. # (c) Cleanup : Undeploy service assembly, uninstall component #
  41. # #
  42. #############################################################################################
  43. . ./regress_defs.ksh
  44. COMPONENT_ARCHIVE_1=$JV_SVC_TEST_CLASSES/dist/component-binding-1.jar
  45. COMPONENT_NAME_1=manage-binding-1
  46. COMPONENT_ARCHIVE_2=$JV_SVC_TEST_CLASSES/dist/component-binding-2.jar
  47. COMPONENT_NAME_2=manage-binding-2
  48. SA_ARCHIVE=$JV_SVC_TEST_CLASSES/dist/deploy-sa.jar
  49. SA_NAME=esbadmin00089-sa
  50. #
  51. # Setup :
  52. #
  53. ant -q -emacs -DESBMEMBER_ADMIN_PORT="$JBI_ADMIN_PORT" -lib "$REGRESS_CLASSPATH" -f Package.xml pkg.service.assembly.jars
  54. ant -q -emacs -DESBMEMBER_ADMIN_PORT="$JBI_ADMIN_PORT" -lib "$REGRESS_CLASSPATH" -f jbiadmin00136.xml pkg.test.components
  55. # Setup : Install and start component on server
  56. $JBI_ANT -Djbi.install.file=$COMPONENT_ARCHIVE_1 install-component
  57. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_1 start-component
  58. # Setup : Install and start component on server for deploying the service assembly
  59. $JBI_ANT -Djbi.install.file=$COMPONENT_ARCHIVE_2 install-component
  60. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_2 start-component
  61. # Test (c) : Deploy the service assembly, expected : partial success
  62. $JBI_ANT -Djbi.deploy.file=$SA_ARCHIVE deploy-service-assembly
  63. $JBI_ANT list-service-assemblies
  64. # Cleanup : undeploy the service assembly
  65. $JBI_ANT -Djbi.service.assembly.name=$SA_NAME -Djbi.force.task=true -Djbi.keep.archive=false undeploy-service-assembly
  66. $JBI_ANT list-service-assemblies
  67. # Cleanup : stop/shutdown/uninstall both the components
  68. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_1 stop-component
  69. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_1 shut-down-component
  70. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_1 -Djbi.keep.archive=false uninstall-component
  71. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_2 stop-component
  72. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_2 shut-down-component
  73. $JBI_ANT -Djbi.component.name=$COMPONENT_NAME_2 -Djbi.keep.archive=false uninstall-component