Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 7 additions & 23 deletions test/extended/node/zstd_chunked.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package node

import (
"context"
"fmt"
"time"

g "github.com/onsi/ginkgo/v2"
Expand All @@ -13,35 +12,19 @@ import (
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"

exutil "github.com/openshift/origin/test/extended/util"
"github.com/openshift/origin/test/extended/util/image"
)

var _ = g.Describe("[sig-builds][sig-node][Feature:Builds][apigroup:build.openshift.io] zstd:chunked Image", func() {
var _ = g.Describe("[sig-node] zstd:chunked Image", func() {
defer g.GinkgoRecover()
var (
oc = exutil.NewCLI("zstd-chunked-image")
customBuildAdd = exutil.FixturePath("testdata", "node", "zstd-chunked")
customBuildFixture = exutil.FixturePath("testdata", "node", "zstd-chunked", "test-custom-build.yaml")
oc = exutil.NewCLI("zstd-chunked-image")
)

g.It("should successfully run date command", func(ctx context.Context) {
namespace := oc.Namespace()

g.By("creating custom builder image")
// Build with buildah with --compression-format zstd:chunked to ensure the image is compressed with zstd:chunked.
// https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/builds_using_buildconfig/custom-builds-buildah#builds-build-custom-builder-image_custom-builds-buildah
err := oc.Run("new-build").Args("--binary", "--strategy=docker", "--name=custom-builder-image").Execute()
o.Expect(err).NotTo(o.HaveOccurred())
br, _ := exutil.StartBuildAndWait(oc, "custom-builder-image", fmt.Sprintf("--from-dir=%s", customBuildAdd))
br.AssertSuccess()
g.By("start custom build and build should complete")
err = oc.AsAdmin().Run("create").Args("-f", customBuildFixture).Execute()
o.Expect(err).NotTo(o.HaveOccurred())
err = oc.AsAdmin().Run("start-build").Args("sample-custom-build").Execute()
o.Expect(err).NotTo(o.HaveOccurred())
err = exutil.WaitForABuild(oc.BuildClient().BuildV1().Builds(oc.Namespace()), "sample-custom-build-1", nil, nil, nil)
o.Expect(err).NotTo(o.HaveOccurred())

// Define a pod that runs the date command using the zstd-chunked image
// Define a pod that runs the date command using a prebuilt zstd:chunked image
pod := &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "zstd-chunked-pod",
Expand All @@ -52,14 +35,15 @@ var _ = g.Describe("[sig-builds][sig-node][Feature:Builds][apigroup:build.opensh
Containers: []corev1.Container{
{
Name: "zstd-chunked-container",
Image: fmt.Sprintf("image-registry.openshift-image-registry.svc:5000/%s/sample-custom:latest", namespace),
Image: image.LocationFor("quay.io/crio/zstd-chunked:1"),
Command: []string{"date"},
},
},
},
}

g.By("Creating a pod")
g.By("Creating a pod with prebuilt zstd:chunked image")
var err error
pod, err = oc.KubeClient().CoreV1().Pods(namespace).Create(context.Background(), pod, metav1.CreateOptions{})
o.Expect(err).NotTo(o.HaveOccurred())

Expand Down
145 changes: 0 additions & 145 deletions test/extended/testdata/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions test/extended/testdata/node/zstd-chunked/Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions test/extended/testdata/node/zstd-chunked/Dockerfile.sample

This file was deleted.

21 changes: 0 additions & 21 deletions test/extended/testdata/node/zstd-chunked/build.sh

This file was deleted.

30 changes: 0 additions & 30 deletions test/extended/testdata/node/zstd-chunked/test-custom-build.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions test/extended/util/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ var (

// image required for OLMv1 tests in https://github.com/openshift/operator-framework-operator-controller/tree/main/openshift/tests-extension
"quay.io/olmtest/webhook-operator:v0.0.5": -1,

// used by zstd:chunked image tests
"quay.io/crio/zstd-chunked:1": -1,
}
)

Expand Down
1 change: 1 addition & 0 deletions test/extended/util/image/zz_generated.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is generated by hack/update-generated.sh
docker.io/library/registry:2.8.0-beta.1 quay.io/openshift/community-e2e-images:e2e-docker-io-library-registry-2-8-0-beta-1-8x_YFKSuz9Xw6lZD
quay.io/crio/zstd-chunked:1 quay.io/openshift/community-e2e-images:e2e-quay-io-crio-zstd-chunked-1-0WG37FZRdxgvrbPZ
quay.io/keycloak/keycloak:25.0 quay.io/openshift/community-e2e-images:e2e-quay-io-keycloak-keycloak-25-0-rEIw9B2Zcc3L1M6k
quay.io/kubevirt/fedora-with-test-tooling-container-disk:20241024_891122a6fc quay.io/openshift/community-e2e-images:e2e-quay-io-kubevirt-fedora-with-test-tooling-container-disk-20241024_891122a6fc-IycYTh-87XrXse4E
quay.io/olmtest/webhook-operator:v0.0.5 quay.io/openshift/community-e2e-images:e2e-quay-io-olmtest-webhook-operator-v0-0-5--2OhUsk-Xv-pLaTI
Expand Down