-
Notifications
You must be signed in to change notification settings - Fork 3
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
add manual e2e testing procedure #363
Conversation
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.
I do not really sée hère how to run thé testing procedure at all right?
And could we have thé requirements (Loki canary enabled, check app is in déployed state in a script right?
Co-authored-by: Quentin Bisson <quentin@giantswarm.io>
Sure I can write something for that :) |
7abb46f
to
bd6954f
Compare
@QuentinBisson I added a small script for checking essential requirements (app is deployed and loki-canary enabled) |
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 but I'm no bash experts
I tested it and it works :) |
40b507a
to
8aaf67a
Compare
I also added a PR message template so that the user is invited to follow the testing procedure before asking for reviews. |
tests/manual_e2e/basic_checks.sh
Outdated
|
||
deployed=$(kubectl get app -n giantswarm loki -o yaml | yq .status.release.status) | ||
|
||
[[ "$deployed" != "deployed" ]] && exit_error "loki app is not in deployed state. Please fix the app before retrying" || echo "loki app is indeed in deployed state" |
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.
The ||
is useless: if the test matches, it will exit_error.
Also, most linters don't like too long lines.
So I suggest something like this:
[[ "$deployed" != "deployed" ]] && exit_error "loki app is not in deployed state. Please fix the app before retrying" || echo "loki app is indeed in deployed state" | |
[[ "$deployed" != "deployed" ]] \ | |
&& exit_error "loki app is not in deployed state. Please fix the app before retrying" | |
echo "✔️ loki app is in deployed state" |
Which would apply to all tests then.
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.
Sure. As for the ||
this is just to keep logging updates on the advancement of the process. But if you think this isn't needed, I can get rid of those as well
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.
I didn't say the log message informing that the test passed successfully is useless.
I said the condition before it is useless.
My suggestion keeps the message, but removes the condition.
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.
Oh ok I get it
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.
@hervenicol I added back the messages without the condition
@hervenicol asking for your review again :) |
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
tests/manual_e2e/basic_checks.sh
Outdated
deployed=$(kubectl get app -n giantswarm loki -o yaml | yq .status.release.status) | ||
|
||
[[ "$deployed" != "deployed" ]] \ |
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.
deployed=$(kubectl get app -n giantswarm loki -o yaml | yq .status.release.status) | |
[[ "$deployed" != "deployed" ]] \ | |
status=$(kubectl get app -n giantswarm loki -o yaml | yq .status.release.status) | |
[[ "$status" != "deployed" ]] \ |
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.
Used appStatus
to be even more precise :)
Towards giantswarm/roadmap#2008