From 9fe9884a0bcdc4b2257a8d952fd2a3290d517870 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Mon, 8 Sep 2025 13:00:15 -0600 Subject: [PATCH] fix: skip chart read error when running as root Signed-off-by: Terry Howe --- pkg/pusher/ocipusher_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/pusher/ocipusher_test.go b/pkg/pusher/ocipusher_test.go index 24f52a7ad..1afb46b9e 100644 --- a/pkg/pusher/ocipusher_test.go +++ b/pkg/pusher/ocipusher_test.go @@ -355,6 +355,13 @@ func TestOCIPusher_Push_ChartOperations(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + // Permission-related behavior can differ when running as root. + // The "chart read error" case relies on chmod 0000 causing a read failure, + // which root may bypass in some environments (e.g., Ubuntu containers). + if tt.name == "chart read error" && os.Geteuid() == 0 { + t.Skip("skipping permission test when running as root: chmod 0000 may not deny access for root") + } + chartRef := tt.chartRef var cleanup func()