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

NO-JIRA: Allow the command in wait_for_cmd_amount to receive arguments to pass to the inner function #5668

Merged
merged 1 commit into from Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions deploy/operator/utils.sh
Expand Up @@ -123,10 +123,10 @@ function wait_for_cmd_amount() {
interval="$2"
cmd="$3"

until [ $(${cmd} | wc -l) -eq ${amount} ]; do
until [ $(${cmd} "${@:4}" | wc -l) -eq ${amount} ]; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer to create a var in a similar fashion to 'cmd'

I.e

arguments = "${@:4}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it is multiple arguments, it seems better this way

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

sleep ${interval}
done
echo "done" $(${cmd} | wc -l)
echo "done" $(${cmd} "${@:4}" | wc -l)
}

function wait_for_boolean_field() {
Expand Down