From 0ba920c70ddcc32d26e8bd8213c7066b888f54d2 Mon Sep 17 00:00:00 2001 From: Theodor Mihalache Date: Thu, 27 Feb 2025 13:46:52 -0500 Subject: [PATCH] E2E storage issue prints Signed-off-by: Theodor Mihalache --- infra/feast-operator/test/utils/test_util.go | 46 ++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/infra/feast-operator/test/utils/test_util.go b/infra/feast-operator/test/utils/test_util.go index 069219860a..8f045baa0c 100644 --- a/infra/feast-operator/test/utils/test_util.go +++ b/infra/feast-operator/test/utils/test_util.go @@ -358,18 +358,46 @@ func DeployOperatorFromCode(testDir string) { _, _ = Run(cmd, testDir) var err error + var output []byte // projectimage stores the name of the image used in the example var projectimage = "localhost/feast-operator:v0.0.1" + By("Check storage space before operator image build") + cmd = exec.Command("df", "-h") + output, err = Run(cmd, testDir) + _, _ = fmt.Println(GinkgoWriter, string(output)) + cmd = exec.Command("du", "-sh", "/tmp/images-*/") + output, err = Run(cmd, testDir) + _, _ = fmt.Println(GinkgoWriter, string(output)) + ExpectWithOffset(1, err).NotTo(HaveOccurred()) + By("building the manager(Operator) image") cmd = exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectimage)) _, err = Run(cmd, testDir) ExpectWithOffset(1, err).NotTo(HaveOccurred()) + By("Check storage space before loading operator image") + cmd = exec.Command("df", "-h") + output, err = Run(cmd, testDir) + _, _ = fmt.Println(GinkgoWriter, string(output)) + cmd = exec.Command("du", "-sh", "/tmp/images-*/") + output, err = Run(cmd, testDir) + _, _ = fmt.Println(GinkgoWriter, string(output)) + ExpectWithOffset(1, err).NotTo(HaveOccurred()) + By("loading the the manager(Operator) image on Kind") err = LoadImageToKindClusterWithName(projectimage, testDir) ExpectWithOffset(1, err).NotTo(HaveOccurred()) + By("Check storage space after loaded operator image") + cmd = exec.Command("df", "-h") + output, err = Run(cmd, testDir) + _, _ = fmt.Println(GinkgoWriter, string(output)) + cmd = exec.Command("du", "-sh", "/tmp/images-*/") + output, err = Run(cmd, testDir) + _, _ = fmt.Println(GinkgoWriter, string(output)) + ExpectWithOffset(1, err).NotTo(HaveOccurred()) + // this image will be built in above make target. var feastImage = "feastdev/feature-server:dev" var feastLocalImage = "localhost/feastdev/feature-server:dev" @@ -379,6 +407,15 @@ func DeployOperatorFromCode(testDir string) { _, err = Run(cmd, testDir) ExpectWithOffset(1, err).NotTo(HaveOccurred()) + By("Check storage space after feast image build") + cmd = exec.Command("df", "-h") + output, err = Run(cmd, testDir) + _, _ = fmt.Println(GinkgoWriter, string(output)) + cmd = exec.Command("du", "-sh", "/tmp/images-*/") + output, err = Run(cmd, testDir) + _, _ = fmt.Println(GinkgoWriter, string(output)) + ExpectWithOffset(1, err).NotTo(HaveOccurred()) + By("Tag the local feast image for the integration tests") cmd = exec.Command("docker", "image", "tag", feastImage, feastLocalImage) _, err = Run(cmd, testDir) @@ -388,6 +425,15 @@ func DeployOperatorFromCode(testDir string) { err = LoadImageToKindClusterWithName(feastLocalImage, testDir) ExpectWithOffset(1, err).NotTo(HaveOccurred()) + By("Check storage space after feast image loaded") + cmd = exec.Command("df", "-h") + output, err = Run(cmd, testDir) + _, _ = fmt.Println(GinkgoWriter, string(output)) + cmd = exec.Command("du", "-sh", "/tmp/images-*/") + output, err = Run(cmd, testDir) + _, _ = fmt.Println(GinkgoWriter, string(output)) + ExpectWithOffset(1, err).NotTo(HaveOccurred()) + By("installing CRDs") cmd = exec.Command("make", "install") _, err = Run(cmd, testDir)