Migrate upgrade tests to use new framework#4519
Conversation
|
Skipping CI for Draft Pull Request. |
Codecov Report
@@ Coverage Diff @@
## master #4519 +/- ##
=======================================
Coverage 81.31% 81.31%
=======================================
Files 290 290
Lines 8157 8157
=======================================
Hits 6633 6633
Misses 1126 1126
Partials 398 398 Continue to review full report at Codecov.
|
53b68fb to
0aa5b8c
Compare
|
/test pull-knative-eventing-upgrade-tests |
|
/assign @zhongduo |
|
@zhongduo sure. After it is completed. |
|
/test pull-knative-eventing-upgrade-tests |
|
|
4f2dd57 to
cd5a8bb
Compare
…de-tests Conflicts fixed: * go.sum * vendor/modules.txt
We need to point ourselves to specific directory as our scripts are location sensitive.
|
This one is ready for review @aliok @zhongduo. The log output for upgrade tests looks sweet in my opinion. As well as Junit method names! 🎉 🥳 This relies on knative/hack#30 to be merged. |
| readonly KO_YAML_FLAGS="${KO_YAML_FLAGS} ${KO_FLAGS} --platform=all" | ||
|
|
||
| if [[ -n "${TAG}" ]]; then | ||
| if [[ -n "${TAG:-}" ]]; then |
There was a problem hiding this comment.
When using strict bash setting of set -Eeuo pipefail that fails because of -u: fail on unset variable being dereferenced.
Bash could know if variable is unset or empty.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok, cardil The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
zhongduo
left a comment
There was a problem hiding this comment.
The complexity of this PR are in hack and pkg repo, this is a refactoring to use the new framework. It looks good to me. All my comments are nits, please feel free to ignore them and unhold.
| c.Log.Info("Running shell function: ", shellfunc) | ||
| err := callShellFunction(shellfunc) | ||
| if err != nil { | ||
| c.T.Error(err) |
There was a problem hiding this comment.
Should this be Fatal instead? Or I am guessing the Operation caller will call Fatal when there is an error in installation, right?
There was a problem hiding this comment.
It will break operations, yeah.
| ops := []string{ | ||
| "install_head", | ||
| "install_channel_crds", | ||
| "install_mt_broker", | ||
| "install_sugar", | ||
| } |
There was a problem hiding this comment.
I am a little bit concerned about this as sometimes there may be hacky code in bash script to install it properly, eg waiting to make sure all the pods in the previous step are running before applying next. I am wondering if there is a bash function that does all these installations and we can just call the bash function instead. But for sure we can change it later if such a bash function is required.
There was a problem hiding this comment.
There are no such function. Each of those functions has appropriate waits built inside, so it isn't needed.
Current code executes them directly: https://github.com/knative/eventing/pull/4519/files#diff-1c4d417537c9878a5068005f79761334318400204068c4dfd4a7656226bfefe1L61-L64
| limitations under the License. | ||
| */ | ||
|
|
||
| package installation |
There was a problem hiding this comment.
I wonder if we can just use install instead.
There was a problem hiding this comment.
I used installation as I wanted noun, packages should be nouns. install is a verb.
That's why I think installation is better one.
|
/unhold Unholding as I think I satisfied @zhongduo question. If don't, please comment, and we could follow up. |
Fixes #4518
Proposed Changes