Skip to content

Commit

Permalink
[QE]fix get arm64 image failure
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyLuLiu committed Jan 7, 2025
1 parent a697b9e commit abe54c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/features/story_openshift.feature
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Feature: 4 Openshift stories
Given executing "oc new-project testproj" succeeds
# mirror
When executing "oc registry login --insecure=true" succeeds
Then executing "oc image mirror registry.access.redhat.com/ubi8/httpd-24:latest=default-route-openshift-image-registry.apps-crc.testing/testproj/hello:test --insecure=true" succeeds
Then OC mirror http image
And executing "oc set image-lookup hello" succeeds
# deploy
When executing "oc apply -f hello.yaml" succeeds
Expand Down
8 changes: 8 additions & 0 deletions test/e2e/testsuite/testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,8 @@ func InitializeScenario(s *godog.ScenarioContext) {
s.Step(`^kubeconfig is cleaned up$`,
EnsureKubeConfigIsCleanedUp)

s.Step(`^OC mirror http image$`,OCmirrorHttpImage)

Check failure on line 537 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (macOS-13, 1.22)

File is not properly formatted (gofmt)

Check failure on line 537 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (macOS-14, 1.22)

File is not properly formatted (gofmt)

Check failure on line 537 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.22)

File is not properly formatted (gofmt)

Check failure on line 537 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.22)

File is not properly formatted (gofmt)

s.After(func(ctx context.Context, _ *godog.Scenario, err error) (context.Context, error) {

if usingPreexistingCluster() {
Expand All @@ -557,6 +559,12 @@ func InitializeScenario(s *godog.ScenarioContext) {
})
}

func OCmirrorHttpImage() error {

Check failure on line 562 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (macOS-13, 1.22)

var-naming: func OCmirrorHttpImage should be OCmirrorHTTPImage (revive)

Check failure on line 562 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (windows-2022, 1.22)

var-naming: func OCmirrorHttpImage should be OCmirrorHTTPImage (revive)

Check failure on line 562 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (macOS-14, 1.22)

var-naming: func OCmirrorHttpImage should be OCmirrorHTTPImage (revive)

Check failure on line 562 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.22)

var-naming: func OCmirrorHttpImage should be OCmirrorHTTPImage (revive)

Check failure on line 562 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.22)

var-naming: func OCmirrorHttpImage should be OCmirrorHTTPImage (revive)
oc_mirror_cmd := fmt.Sprintf("oc image mirror registry.access.redhat.com/ubi8/httpd-24:latest=default-route-openshift-image-registry.apps-crc.testing/testproj/hello:test --insecure=true --filter-by-os=linux/%s",runtime.GOARCH)

Check failure on line 563 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (macOS-13, 1.22)

var-naming: don't use underscores in Go names; var oc_mirror_cmd should be ocMirrorCmd (revive)

Check failure on line 563 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (windows-2022, 1.22)

var-naming: don't use underscores in Go names; var oc_mirror_cmd should be ocMirrorCmd (revive)

Check failure on line 563 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (macOS-14, 1.22)

var-naming: don't use underscores in Go names; var oc_mirror_cmd should be ocMirrorCmd (revive)

Check failure on line 563 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.22)

var-naming: don't use underscores in Go names; var oc_mirror_cmd should be ocMirrorCmd (revive)

Check failure on line 563 in test/e2e/testsuite/testsuite.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.22)

var-naming: don't use underscores in Go names; var oc_mirror_cmd should be ocMirrorCmd (revive)
err := util.ExecuteCommandSucceedsOrFails(oc_mirror_cmd,"succeeds")
return err
}

func usingPreexistingCluster() bool {
return strings.Contains(GodogTags, "~@startstop")
}
Expand Down

0 comments on commit abe54c2

Please sign in to comment.