-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use centralised assert.sh
script [DI-171]
#206
Use centralised assert.sh
script [DI-171]
#206
Conversation
The `assert.sh` script was [sourced externally](https://github.com/torokmark/assert.sh) but a local copy was included in the repository. This change removes the local copy, instead dynamically fetching from a central [Hazelcast fork](https://github.com/hazelcast/assert.sh). Our local copy had some small changes, which have been lost, but the previous version has been migrated to a branch of the Hazelcast fork to allow [a diff of the script](hazelcast/assert.sh@main...hazelcast-packaging). Specifically, the changes are only to improve formatting of assertion messages, not the assertions themselves. Fixes: [DI-171](https://hazelcast.atlassian.net/browse/DI-171)
@ldziedziul @nishaatr are you able to take a look at this, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM at at back of hazelcast/hazelcast-docker#779
Waiting with approval update of logging in tests |
Done. |
packages/brew/test_brew_functions.sh
Outdated
@@ -11,7 +14,8 @@ function assertAlphanumCamelCase { | |||
local testValue=$1 | |||
local expected=$2 | |||
local actual=$(alphanumCamelCase "$testValue") | |||
assert_eq "$expected" "$actual" "Alphanumeric camel case of $testValue should be equal to $expected " || TESTS_RESULT=$? | |||
local msg="Alphanumeric camel case of $testValue should be equal to $expected" | |||
assert_eq "$expected" "$actual" "$msg" && log_success "$MSG" || TESTS_RESULT=$? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Casing is mixed up here and this file is not run during be test_scripts.sh
. Could you rename this file brew_functions_test.sh
to be picked up ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Casing is mixed up here
I'll fix that
and this file is not run during be
test_scripts.sh
. Could you rename this filebrew_functions_test.sh
to be picked up ?
I've tried that, but unfortunately the script doesn't pass on master
either. So for now I'll leave it alone, but raise as a separate issue for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...actually this might be a Mac + sed
issue. Let me take another look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming them works on non-Mac platforms.
There's some issue here: https://github.com/hazelcast/hazelcast-packaging/actions/runs/10187951924/job/28207888467#step:4:36 |
…h-from-a-single-repository
The action was running on the merge commit, as that test is new and wasn't in this branch... fixed. |
The
assert.sh
script was sourced externally but a local copy was included in the repository.This change removes the local copy, instead dynamically fetching from a central Hazelcast fork.
Our local copy had some small changes, which have been lost, but the previous version has been migrated to a branch of the Hazelcast fork to allow a diff of the script.
Specifically, the changes are only to improve formatting of assertion messages, not the assertions themselves.
Fixes: DI-171