Skip to content

Commit

Permalink
Run WildFly Subsystem archetype tests from CI
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Mesnil <jmesnil@redhat.com>
  • Loading branch information
jmesnil committed Aug 16, 2023
1 parent 4f4e95f commit c366b2c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,10 @@ jobs:
sleep 20
./runtest_remote.sh $ARCHETYPE_VERSION
$JBOSS_HOME/bin/jboss-cli.sh --connect command=:shutdown
echo "### Remote Tests :white_check_mark:" >> $GITHUB_STEP_SUMMARY
echo "### Remote Tests :white_check_mark:" >> $GITHUB_STEP_SUMMARY
- name: Run WildFly Subsystem Archetype Tests
run: |-
cd wildfly-subsystem-archetype/testing
./runtest.sh $ARCHETYPE_VERSION
echo "## WildFly Subsystem Archetype" >> $GITHUB_STEP_SUMMARY
echo "### Tests :white_check_mark:" >> $GITHUB_STEP_SUMMARY
14 changes: 9 additions & 5 deletions wildfly-subsystem-archetype/testing/runtest.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ mvn archetype:generate -DgroupId=com.acme -DartifactId=example-subsystem -Dversi
retVal=$?
if [ $retVal -ne 0 ]; then
echo "[ERROR] Maven project creation failed. Errorcode: $retVal"
exit 1
exit $retVal
fi


Expand All @@ -75,9 +75,9 @@ cp -r example-subsystem/target/module/org $JBOSS_HOME/modules/system/layers/base


echo "WildFly server is starting..."
konsole -e $JBOSS_HOME/bin/standalone.sh &
$JBOSS_HOME/bin/standalone.sh &

read -n1 -r -p "Press enter when WildFly was started to continue the test" key
sleep 20

echo "Configuring subsystem..."
echo "This might cause errors if a previous test run did not cleanup and e.g. the subsystem already exists."
Expand All @@ -86,8 +86,12 @@ $JBOSS_HOME/bin/jboss-cli.sh --file=configure.cli

echo "Subsystem was registered - check WildFly console for error messages."
echo "If all went well, there will be an output 'mysubsystem was successfully initialized'".
echo
read -n1 -r -p "After you checked this, press enter to unregister the subsystem and do cleanup." key

grep "mysubsystem was successfully initialized" $JBOSS_HOME/standalone/log/server.log
if [ $retVal -ne 0 ]; then
echo "[ERROR] The subsystem was not properly initialized"
exit $retVal
fi


echo "Unregistering subsystem and stopping WildFly..."
Expand Down

0 comments on commit c366b2c

Please sign in to comment.