PageRenderTime 33ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/ri-components/file-binding/runtime/regress/file00005.ksh

https://bitbucket.org/openesb/openesb-core
Korn Shell | 123 lines | 61 code | 29 blank | 33 comment | 0 complexity | e86e2922745f46242eb1779ffe52c139 MD5 | raw file
  1. #
  2. # BEGIN_HEADER - DO NOT EDIT
  3. #
  4. # The contents of this file are subject to the terms
  5. # of the Common Development and Distribution License
  6. # (the "License"). You may not use this file except
  7. # in compliance with the License.
  8. #
  9. # You can obtain a copy of the license at
  10. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  11. # See the License for the specific language governing
  12. # permissions and limitations under the License.
  13. #
  14. # When distributing Covered Code, include this CDDL
  15. # HEADER in each file and include the License file at
  16. # https://open-esb.dev.java.net/public/CDDLv1.0.html.
  17. # If applicable add the following below this CDDL HEADER,
  18. # with the fields enclosed by brackets "[]" replaced with
  19. # your own identifying information: Portions Copyright
  20. # [year] [name of copyright owner]
  21. #
  22. #
  23. # @(#)file00005.ksh
  24. # Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
  25. #
  26. # END_HEADER - DO NOT EDIT
  27. #
  28. echo "filebinding00005.ksh- Test MEPs - file binding test"
  29. . ./regress_defs.ksh
  30. # create test engine
  31. cd $FILEBINDING_BLD_DIR/testengine
  32. cp $FILEBINDING_REGRESS_DIR/testengine/*.xml .
  33. cp -r $FILEBINDING_REGRESS_DIR/testengine/META-INF .
  34. rm -rf META-INF/CVS
  35. mkdir testengine
  36. mv *.class testengine
  37. mv payload.xml testengine
  38. mv response.xml testengine
  39. jar cvf testengine.jar .
  40. # now install this test engine
  41. $JBI_ANT -Djbi.install.file=$FILEBINDING_BLD_DIR/testengine/testengine.jar install-component
  42. # start out tests tests
  43. $JBI_ANT -Djbi.component.name=TESTENGINE_FOR_FILEBINDING start-component
  44. echo
  45. echo "Testing out-only with valid message"
  46. grep "Test-GOODOUTONLY-Passed" $DOMAIN_LOG | wc -l
  47. ls $FILEBINDING_BLD_DIR/test/outboundoutput | wc -l
  48. echo
  49. echo
  50. echo "Testing out-only with invalid message"
  51. grep "Test-BADOUTONLY-Passed" $DOMAIN_LOG | wc -l
  52. ls $FILEBINDING_BLD_DIR/test/outboundoutput | wc -l
  53. echo
  54. echo
  55. echo "Testing robust-out-only with valid message"
  56. grep "Test-GOODROBUSTOUTONLY-Passed" $DOMAIN_LOG | wc -l
  57. ls $FILEBINDING_BLD_DIR/test/outboundoutput | wc -l
  58. echo
  59. echo
  60. echo "Testing robust-out-only with invalid message"
  61. grep "Test-BADROBUSTOUTONLY-Passed" $DOMAIN_LOG | wc -l
  62. ls $FILEBINDING_BLD_DIR/test/outboundoutput | wc -l
  63. echo
  64. # put a file in input folder to start in-out exchange
  65. # starting in-out test
  66. cp $FILEBINDING_BLD_DIR/test/sample_files/inout.xml $FILEBINDING_BLD_DIR/test/input/transforminout
  67. sleep 5
  68. echo
  69. echo "Testing in-out with valid message"
  70. grep "Test-GOODINOUT-Passed" $DOMAIN_LOG | wc -l
  71. ls $FILEBINDING_BLD_DIR/test/output | wc -l
  72. ls $FILEBINDING_BLD_DIR/test/processed | wc -l
  73. echo
  74. cp $FILEBINDING_BLD_DIR/test/sample_files/inonly.xml $FILEBINDING_BLD_DIR/test/input/transforminonly
  75. sleep 5
  76. echo
  77. echo "Testing in-only with valid message"
  78. grep "Test-GOODINONLY-Passed" $DOMAIN_LOG | wc -l
  79. ls $FILEBINDING_BLD_DIR/test/output | wc -l
  80. ls $FILEBINDING_BLD_DIR/test/processed | wc -l
  81. echo
  82. cp $FILEBINDING_BLD_DIR/test/sample_files/robustinonly.xml $FILEBINDING_BLD_DIR/test/input/transformrobustinonly
  83. sleep 5
  84. echo
  85. echo "Testing robust-in-only with valid message"
  86. grep "Test-GOODROBUSTINONLY-Passed" $DOMAIN_LOG | wc -l
  87. ls $FILEBINDING_BLD_DIR/test/output | wc -l
  88. ls $FILEBINDING_BLD_DIR/test/processed | wc -l
  89. echo
  90. $JBI_ANT -Djbi.component.name=TESTENGINE_FOR_FILEBINDING stop-component
  91. $JBI_ANT -Djbi.component.name=TESTENGINE_FOR_FILEBINDING shut-down-component
  92. $JBI_ANT -Djbi.component.name=TESTENGINE_FOR_FILEBINDING uninstall-component
  93. # stop shutdown uninstall
  94. echo Completed Testing file binding MEPs