Skip to content

Commit

Permalink
E2E storage issue prints
Browse files Browse the repository at this point in the history
Signed-off-by: Theodor Mihalache <[email protected]>
  • Loading branch information
tmihalac committed Feb 27, 2025
1 parent 414d062 commit 0ba920c
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions infra/feast-operator/test/utils/test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 0ba920c

Please sign in to comment.