From aabbb677f179ebe18c9984e831f2e9238ef2b63c Mon Sep 17 00:00:00 2001 From: 7h3-3mp7y-m4n Date: Wed, 13 May 2026 01:12:11 +0530 Subject: [PATCH] feat: add quiet image pulls by default Signed-off-by: 7h3-3mp7y-m4n --- tests/e2e/common.go | 6 +++++- tests/e2e/utils.go | 13 +++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/e2e/common.go b/tests/e2e/common.go index e232c636..800bed81 100644 --- a/tests/e2e/common.go +++ b/tests/e2e/common.go @@ -123,7 +123,11 @@ func commonCmdExec(command string) (output string, err error) { } func commonPull(tool string, image string) error { - pullCmd := tool + " image pull " + image + pullCmd := tool + " image pull " + if !verbosePull() { + pullCmd += "-q " + } + pullCmd += image output, err := commonCmdExec(pullCmd) if err != nil { diff --git a/tests/e2e/utils.go b/tests/e2e/utils.go index b8372557..4845be4e 100644 --- a/tests/e2e/utils.go +++ b/tests/e2e/utils.go @@ -81,8 +81,11 @@ func pullImageWithRetry(testFunc string, image string) error { func pullImageForTest(testFunc string, image string) error { switch testFunc { case testCrictl: - cmd := crictlName + " pull " + image - output, err := commonCmdExec(cmd) + cmd := crictlName + " pull " + if !verbosePull() { + cmd += "-q " + } + cmd += image if err != nil { return fmt.Errorf("%s -- %v", output, err) } @@ -257,3 +260,9 @@ func findLineInFile(filePath string, pattern string) (string, error) { return "", fmt.Errorf("Pattern %s was not found in any line of %s", pattern, filePath) } + +// Set URUNC_VERBOSE_PULL=true locally to see pull progress output +func verbosePull() bool { + v := os.Getenv("URUNC_VERBOSE_PULL") + return v == "1" || v == "true" +}