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

Make $PWD between TestStep and TestAssert commands consistent #519

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

stuggi
Copy link
Contributor

@stuggi stuggi commented Jun 5, 2024

What this PR does / why we need it:

The $PWD is different when running commands in TestStep and TestAssert which makes it required e.g. to use abs path to reference a script. This change aligns the path passed into testutils.RunAssertCommands() to be the same as to testutils.RunCommands().

Fixes #322

Copy link
Member

@porridge porridge left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!
A couple of nitpicks inline.
Also, now that we have this consistent, would you mind adding a note about the CWD to https://github.com/kudobuilder/kuttl/blob/main/docs/testing/reference.md#commands?

Copy link
Member

@porridge porridge left a comment

Choose a reason for hiding this comment

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

LGTM, just one more nitpick.

docs/testing/reference.md Outdated Show resolved Hide resolved
The $PWD is different when running commands in TestStep and
TestAssert which makes it required e.g. to use abs path to
reference a script. This change aligns the path passed into
testutils.RunAssertCommands() to be the same as to
testutils.RunCommands().

Fixes kudobuilder#322

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@porridge porridge merged commit 5d5d085 into kudobuilder:main Jun 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent $PWD between TestStep and TestAssert commands
2 participants