Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: E2E storage issue prints #5107

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
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("sudo", "ls", "-la", "/var/lib/docker/overlay2")
output, _ = 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("sudo", "ls", "-la", "/var/lib/docker/overlay2")
output, _ = 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("sudo", "ls", "-la", "/var/lib/docker/overlay2")
output, _ = 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("sudo", "ls", "-la", "/var/lib/docker/overlay2")
output, _ = 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("sudo", "ls", "-la", "/var/lib/docker/overlay2")
output, _ = 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
Loading