Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reschandreas committed Dec 31, 2023
1 parent e7f77df commit 8f49585
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 17 deletions.
3 changes: 2 additions & 1 deletion src/main/resources/templates/aeolus/assembler/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ junit () {
chmod -R 777 .

}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/aeolus/haskell/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ junit () {
echo '⚙️ executing junit'
#empty script action, just for the results
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ junit () {
echo '⚙️ executing junit'
#empty script action, just for the results
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ setup_working_directory_for_cleanup () {
echo '⚙️ executing setup_working_directory_for_cleanup'
chmod -R 777 .
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ setup_working_directory_for_cleanup () {
echo '⚙️ executing setup_working_directory_for_cleanup'
chmod -R 777 .
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ static_analysis () {
echo '⚙️ executing static_analysis'
mvn spotbugs:spotbugs checkstyle:checkstyle pmd:pmd pmd:cpd
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ maven_1 () {
echo '⚙️ executing maven_1'
mvn spotbugs:spotbugs checkstyle:checkstyle pmd:pmd pmd:cpd
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/aeolus/kotlin/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ junit () {
echo '⚙️ executing junit'
#empty script action, just for the results
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ junit () {
echo '⚙️ executing junit'
#empty script action, just for the results
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ junit () {
echo '⚙️ executing junit'
#empty script action, just for the results
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/aeolus/ocaml/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ junit () {
echo '⚙️ executing junit'
#empty script action, just for the results
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/aeolus/python/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ junit () {
echo '⚙️ executing junit'
#empty script action, just for the results
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ junit () {
echo '⚙️ executing junit'
#empty script action, just for the results
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/aeolus/swift/plain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ junit () {
echo '⚙️ executing junit'
#empty script action, just for the results
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/aeolus/swift/plain_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ cd assignment
swiftlint > ../target/swiftlint-result.xml

}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/aeolus/vhdl/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ junit () {
echo '⚙️ executing junit'
#empty script action, just for the results
}
function final_aeolus_post_action () {

final_aeolus_post_action () {
set +e # from now on, we don't exit on errors
echo '⚙️ executing final_aeolus_post_action'
cd "${AEOLUS_INITIAL_DIRECTORY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ void testValidWindfileWithInvalidAction() {
String invalidWindfile = "{\n\"api\": \"v0.0.1\",\n\"metadata\": {\n\"name\": \"example windfile\",\n\"description\": \"example windfile\",\n\"id\": \"example-windfile\"\n},\n\"actions\": [\n{\n\"name\": \"valid-action\",\n\"clsas\": \"script-action\",\n\"scri\": \"echo $PATH\",\n\"runAlways\": true\n}\n]\n}";
try {
Windfile.deserialize(invalidWindfile);
fail("Should have thrown an exception as there is no script or platform in the actions object");
}
catch (JsonParseException exception) {
assertThat(exception.getMessage()).isEqualTo("Cannot determine type");
}
fail("Should have thrown an exception as there is no script or platform in the actions object");
}

@Test
Expand Down

0 comments on commit 8f49585

Please sign in to comment.