Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue with lack of clear message for erroneous suite definition #432

Merged
merged 7 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ All notable changes to AET will be documented in this file.
- [PR-430](https://github.com/Cognifide/aet/pull/430) Upgraded HTML codesniffer to latest release (3.2.0)
- [PR-385](https://github.com/Cognifide/aet/pull/385) Fixed ChefDK and vagrant-berkshelf versions
- [PR-404](https://github.com/Cognifide/aet/pull/404) Added missing tooltip for conditional tests

- [PR-408](https://github.com/Cognifide/aet/pull/408) Advanced Screen Comparision button layout fix
- [PR-432](https://github.com/Cognifide/aet/pull/432) Fixed issue with lack of clear message for erroneous suite definition.

## Version 3.1.0

Expand Down
7 changes: 4 additions & 3 deletions client/client-scripts/aet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ function process_locked_suite {
((UNLOCK_TIMEOUT-=5))
start_suite
else
echo "Unsuccessful Request to \"$endpoint$SUITE_ENDPOINT\", status: $code
$body"
errorMessage=$(echo $body | jq -r ".errorMessage")
echo "Unsuccessful Request to \"$endpoint$SUITE_ENDPOINT\", status: $code, error:
$errorMessage"
exit 1
fi
}
Expand Down Expand Up @@ -196,4 +197,4 @@ while $process_status; do
$body"
exit 1
fi
done
done
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,10 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)

String responseBody = gson.toJson(suiteExecutionResult);

if (resultWrapper.hasError()) {
response.sendError(resultWrapper.getStatusCode(),
suiteExecutionResult.getErrorMessage());
} else {
response.setStatus(HttpStatus.SC_OK);
response.setContentType("application/json");
response.setCharacterEncoding(CharEncoding.UTF_8);
response.getWriter().write(responseBody);
}
response.setStatus(resultWrapper.getStatusCode());
response.setContentType("application/json");
response.setCharacterEncoding(CharEncoding.UTF_8);
response.getWriter().write(responseBody);
} else {
response.sendError(HttpStatus.SC_BAD_REQUEST, "Request does not contain the test suite");
}
Expand Down