-
Notifications
You must be signed in to change notification settings - Fork 86
Added s390x arch in Makefiles to build multi arch images and skipped some tests on s390x because of image unavailability #2130
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
base: v1
Are you sure you want to change the base?
Conversation
hash-d
left a comment
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.
For the tests that cannot be run on Z because of missing images, the cluster's architecture should be checked, instead of the local test machine.
If you're running from an x86 VM pointing to a Z cluster, for example, those tests would not be skipped and the test would fail.
| ) | ||
|
|
||
| func TestBookinfo(t *testing.T) { | ||
| if runtime.GOARCH == "s390x" { |
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.
Checking runtime.GOARCH is ok for testLocalGatewayService, because that's a local test. For TestBookInfo, however, you should be inspecting the cluster's architecture, not the local machine.
Check how that's done for ARM, you can adapt that for Z.
…some tests on s390x because of image unavailability
|
@hash-d made the changes as requested by you |
hash-d
left a comment
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.
Please make the check pass, and we should be good to merge.
| //Skipping test on s390x architecture as images unavailable for s390x | ||
| cluster := base.GetClusterContext() | ||
| if err := arch.SkipOnlyS390x(t, cluster); err != nil { | ||
| t.Fatal(err) |
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 check failed because of incorrect Go formatting. This is one such case (missing indent). Please fix these so the check passes.
| } | ||
|
|
||
| // CheckOnlyS390x skips ONLY if the architecture is s390x | ||
| func CheckOnlyS390x(clusters ...*base.ClusterContext) (err error, skip bool) { |
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.
It would have been best to generalize Check(), as listed on its TODO, but this works fine
Added s390x arch in Makefiles to build multi arch images and
Skipping below tests on s390x because of image unavailability :
cc: @hash-d