Added s390x arch in Makefiles to build multi arch images and skipped some tests on s390x because of image unavailability#2130
Conversation
hash-d
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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