/ri-clients/jbi-ant-tasks/regress/ui00006.ksh

https://bitbucket.org/ldassonville/openesb-core · Korn Shell · 135 lines · 53 code · 28 blank · 54 comment · 0 complexity · 12d6ad4fa6ed33ed2d6100a0a2ec0bcd 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. # @(#)ui00006.ksh
  25. # Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
  26. #
  27. # END_HEADER - DO NOT EDIT
  28. #
  29. #regress setup
  30. . ./regress_defs.ksh
  31. JBI_ANT="$JBI_ANT -Djbi.task.fail.on.error=false"
  32. echo $JBI_ANT
  33. #
  34. # test components
  35. #
  36. test_install_deploy_from_domain()
  37. {
  38. ### list all objects. all lists should be empty ###############################
  39. $JBI_ANT list-shared-libraries
  40. $JBI_ANT list-service-engines
  41. $JBI_ANT list-binding-components
  42. $JBI_ANT list-service-assemblies
  43. ### install components/slibs to doamin #########################################
  44. $JBI_ANT -Djbi.install.file=$UI_REGRESS_DIST_DIR/ant-test-sns1.jar -Djbi.target=domain install-shared-library
  45. $JBI_ANT -Djbi.install.file=$UI_REGRESS_DIST_DIR/ant-test-binding1.jar -Djbi.target=domain install-component
  46. $JBI_ANT -Djbi.install.file=$UI_REGRESS_DIST_DIR/ant-test-engine1.jar -Djbi.target=domain install-component
  47. ### deploy service assembly to doamin #########################################
  48. $JBI_ANT -Djbi.deploy.file=$UI_REGRESS_DIST_DIR/ant-test-au1.zip -Djbi.target=domain deploy-service-assembly
  49. ### list components should be in unknown state. ###############################
  50. $JBI_ANT -Djbi.target=domain list-shared-libraries
  51. $JBI_ANT -Djbi.target=domain list-service-engines
  52. $JBI_ANT -Djbi.target=domain list-binding-components
  53. $JBI_ANT -Djbi.target=domain list-service-assemblies
  54. ### install components/slibs from domain to server##############################
  55. $JBI_ANT -Djbi.shared.library.name="ant_test_sns1" -Djbi.target=server install-shared-library
  56. $JBI_ANT -Djbi.component.name="ant_test_binding1" -Djbi.target=server install-component
  57. $JBI_ANT -Djbi.component.name="ant_test_engine1" -Djbi.target=server install-component
  58. ### list components should be in shutdown state. ###############################
  59. $JBI_ANT list-shared-libraries
  60. $JBI_ANT list-service-engines
  61. $JBI_ANT list-binding-components
  62. ### start components ###########################################################
  63. $JBI_ANT -Djbi.component.name="ant_test_engine1" start-component
  64. $JBI_ANT -Djbi.component.name="ant_test_binding1" start-component
  65. ### list components should be in started state. ################################
  66. $JBI_ANT list-service-engines
  67. $JBI_ANT list-binding-components
  68. ### deploy service assembly from domain to server ##############################
  69. $JBI_ANT -Djbi.service.assembly.name="ant_test_assembly_unit_1" -Djbi.target=server deploy-service-assembly
  70. ### list service assembly. should be in shutdown state #########################
  71. $JBI_ANT list-service-assemblies
  72. ### undeploy service assembly ##################################################
  73. $JBI_ANT -Djbi.service.assembly.name="ant_test_assembly_unit_1" undeploy-service-assembly
  74. ### stop component #############################################################
  75. $JBI_ANT -Djbi.component.name="ant_test_binding1" stop-component
  76. $JBI_ANT -Djbi.component.name="ant_test_engine1" stop-component
  77. ### list components should be in stop state. ###################################
  78. $JBI_ANT list-service-engines
  79. $JBI_ANT list-binding-components
  80. ### shutdown component #############################################################
  81. $JBI_ANT -Djbi.component.name="ant_test_binding1" shut-down-component
  82. $JBI_ANT -Djbi.component.name="ant_test_engine1" shut-down-component
  83. ### list components should be in shutdown state. ###############################
  84. $JBI_ANT list-service-engines
  85. $JBI_ANT list-binding-components
  86. ### uninstall components #######################################################
  87. $JBI_ANT -Djbi.component.name=ant_test_engine1 uninstall-component
  88. $JBI_ANT -Djbi.component.name=ant_test_binding1 uninstall-component
  89. $JBI_ANT -Djbi.shared.library.name="ant_test_sns1" uninstall-shared-library
  90. ### list all objects. all lists should be empty ################################
  91. $JBI_ANT list-shared-libraries
  92. $JBI_ANT list-service-engines
  93. $JBI_ANT list-binding-components
  94. $JBI_ANT list-service-assemblies
  95. }
  96. run_test()
  97. {
  98. build_test_artifacts
  99. test_install_deploy_from_domain
  100. }
  101. ################## MAIN ##################
  102. ####
  103. # Execute the test
  104. ####
  105. #this is to correct for differences in ant behavior from version 1.5->1.6. RT 6/18/05
  106. run_test | tr -d '\r' | sed -e '/^$/d'
  107. exit 0