PageRenderTime 49ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://bitbucket.org/openesb/openesb-core
Korn Shell | 110 lines | 52 code | 21 blank | 37 comment | 0 complexity | 83f8914b258cb15df9c98a64a045a6a9 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. # @(#)jbiadmin01500.ksh
  25. # Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
  26. #
  27. # END_HEADER - DO NOT EDIT
  28. #
  29. ####
  30. # This tests is for component update
  31. # A bad component that throws on start is installed in server and a standalone instance
  32. # The component is updated with a corrected version and then it is verified that
  33. # start component succeeds
  34. # This test verifies component update in server instance and
  35. # a stand-alone instance instance1
  36. ####
  37. echo "jbiadmin01500 : Test Component Update."
  38. . ./regress_defs.ksh
  39. ant -q -emacs -DESBMEMBER_ADMIN_PORT="$JBI_ADMIN_PORT" -lib "$REGRESS_CLASSPATH" -f jbiadmin01500.xml 1>&2
  40. echo start instance instance1
  41. asadmin start-instance --port $ASADMIN_PORT -u $AS_ADMIN_USER $ASADMIN_PW_OPTS instance1
  42. startInstanceDelay
  43. echo install the bad component test-component
  44. asadmin install-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT $JV_SVC_TEST_CLASSES/dist/bad-test-component.jar
  45. installComponentDelay
  46. asadmin install-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT --target instance1 $JV_SVC_TEST_CLASSES/dist/bad-test-component.jar
  47. installComponentDelay
  48. echo start the component in server
  49. asadmin start-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component
  50. startComponentDelay
  51. echo start the component in instance1
  52. asadmin start-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT --target instance1 test-component
  53. startComponentDelay
  54. echo shut-down the component in server
  55. asadmin shut-down-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component
  56. stopComponentDelay
  57. echo shut-down the component in instance1
  58. asadmin shut-down-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT --target instance1 test-component
  59. stopComponentDelay
  60. #copy the workspace settings file for future checking
  61. cp $JBI_DOMAIN_ROOT/jbi/components/test-component/install_root/workspace/settings.txt $SVC_TEST_CLASSES/jbiadmin01500-CAS-settings.txt
  62. cp $JBI_DOMAIN_ROOT/../../nodeagents/agent1/instance1/jbi/components/test-component/install_root/workspace/settings.txt $SVC_TEST_CLASSES/jbiadmin01500-instance1-settings.txt
  63. echo update the component
  64. ant -q -emacs -DESBMEMBER_ADMIN_PORT="$JBI_ADMIN_PORT" -lib "$REGRESS_CLASSPATH" -f jbiadmin01500.xml update-component
  65. installComponentDelay
  66. echo verify the workspace dir has been preserved in server
  67. diff $JBI_DOMAIN_ROOT/jbi/components/test-component/install_root/workspace/settings.txt $SVC_TEST_CLASSES/jbiadmin01500-CAS-settings.txt 2>&1
  68. echo verify the workspace dir has been preserved in instance1
  69. diff $JBI_DOMAIN_ROOT/../../nodeagents/agent1/instance1/jbi/components/test-component/install_root/workspace/settings.txt $SVC_TEST_CLASSES/jbiadmin01500-instance1-settings.txt 2>&1
  70. echo verify that install root has been replaced in server
  71. asadmin start-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component
  72. startComponentDelay
  73. echo verify that install root has been replaced in instance1
  74. asadmin start-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT --target instance1 test-component
  75. startComponentDelay
  76. echo shutdown the component in server
  77. asadmin shut-down-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component
  78. stopComponentDelay
  79. echo shutdown the component in instance1
  80. asadmin shut-down-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT --target instance1 test-component
  81. stopComponentDelay
  82. echo uninstall the component from server
  83. asadmin uninstall-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT test-component
  84. uninstallComponentDelay
  85. echo uninstall the component from instance1
  86. asadmin uninstall-jbi-component --terse=false -u $AS_ADMIN_USER $ASADMIN_PW_OPTS --port $ASADMIN_PORT --target instance1 test-component
  87. uninstallComponentDelay
  88. rm $SVC_TEST_CLASSES/jbiadmin01500-CAS-settings.txt
  89. rm $SVC_TEST_CLASSES/jbiadmin01500-instance1-settings.txt